/// <summary> /// Creates an <c>xsl:apply-templates</c> element. /// <code> /// <xsl:apply-templates select="<paramref name="select"/>" mode="<paramref name="mode"/>" /> /// </code> /// </summary> /// <param name="select">The select.</param> /// <param name="mode">The mode.</param> public XsltElement ApplyTemplates(string select, string mode = null) { var element = new XsltElement(XsltElementType.ApplyTemplates, new XAttribute("select", select)); element.SetAttributeValue("mode", mode); return(element); }
/// <summary> /// Creates an <c>xsl:template</c> element. /// <code> /// <xsl:value-of match="<paramref name="match"/>" mode="<paramref name="mode"/>" /> /// </code> /// </summary> /// <param name="match">The match.</param> /// <param name="mode">The mode.</param> public XsltElement Template(string match, string mode = null) { var element = new XsltElement(XsltElementType.Template, new XAttribute("match", match)); element.SetAttributeValue("mode", mode); return(element); }
/// <summary> /// Creates an <c>xsl:output</c> element. /// <code> /// <xsl:output method="<paramref name="outputMethod"/>" /> /// </code> /// </summary> /// <param name="outputMethod">The output method.</param> /// <param name="indent">if set to <c>true</c> [indent].</param> public XsltElement Output(OutputMethod outputMethod = OutputMethod.Xml, bool indent = false) { var element = new XsltElement(XsltElementType.Output, new XAttribute("method", outputMethod.ToString().ToLower())); if (indent) { element.SetAttributeValue("indent", "yes"); } return(element); }