header

XSLT Quick Reference

These elements are part of the XSLT standard, which is a language for transforming XML documents into other formats, such as HTML or plain text. XSLT is a declarative, functional programming language, which means that it uses a series of instructions to specify the transformations that should be applied to the input XML document in order to produce the desired output. This allows XSLT to be used for a wide variety of tasks, such as transforming XML documents into HTML documents for display in a web browser, or converting XML data into a format that can be more easily processed by other applications.

  • xsl:accept is used to terminate the execution of a xsl:iterate or xsl:for-each loop and return the accumulated result.
  • xsl:accumulator is used to define an accumulator that can be used to collect and aggregate values during the execution of a stylesheet.
  • xsl:accumulator-rule is used to define a rule for how an accumulator should process a given input.
  • xsl:analyze-string is used to apply a regular expression to a string and identify the parts of the string that match or do not match the expression.
  • xsl:apply-imports is used to apply the templates imported by the stylesheet that are not overridden by local templates.
  • xsl:apply-templates is used to apply a set of templates to the selected nodes in an XML document.
  • xsl:assert is used to evaluate a Boolean expression and raise an error if the expression is false.
  • xsl:attribute is used to create an attribute node in the output document.
  • xsl:attribute-set is used to define a set of attributes that can be applied to multiple elements in the output document.
  • xsl:break is used to terminate the execution of a xsl:iterate or xsl:for-each loop and return the accumulated result.
  • xsl:call-template is used to call and execute a template that has been defined earlier in the stylesheet.
  • xsl:catch is used to handle errors that are raised during the execution of a stylesheet.
  • xsl:character-map is used to define a character map that specifies how characters in the input document should be mapped to characters in the output document
  • xsl:choose is used to select one of several possible templates or instructions to apply to the current node in the XML document, based on the evaluation of a series of xsl:when elements.
  • xsl:comment is used to add a comment to the output of the transformation.
  • xsl:context-item is used to specify the context item for the transformation. The context item is the current node in the XML document against which expressions are evaluated.
  • xsl:copy is used to create a copy of the current node in the XML document.
  • xsl:copy-of is used to create a copy of the result of an XPath expression in the XML document.
  • xsl:decimal-format is used to specify the format of decimal numbers in the output of the transformation.
  • xsl:document is used to specify the creation of a new document during the transformation.
  • xsl:element is used to create new elements in the output of the transformation.
  • xsl:evaluate is used to evaluate an XPath expression and insert the result in the output of the transformation.
  • xsl:expose is used to expose elements or attributes in the stylesheet so that they can be accessed by other stylesheets.
  • xsl:fallback is used to specify instructions to be used in case the instructions specified in the xsl:try element cannot be executed.
  • xsl:for-each is used to apply templates or instructions to all of the nodes in an XML document that match a specified XPath expression.
  • xsl:for-each-group is used to group nodes in an XML document according to specified criteria and then apply templates or instructions to each group.
  • xsl:fork is used to specify that a series of instructions should be executed in parallel.
  • xsl:function is used to define a function that can be called from within an XPath expression.
  • xsl:global-context-item is used to specify the default value of the context item for the transformation.
  • xsl:if is used to apply a template or instruction to the current node in the XML document if a specified condition is true.
  • xsl:import is used to import a stylesheet from another location.
  • xsl:import-schema is used to import a schema that can be used to validate the structure of the XML document.
  • xsl:include is used to include a stylesheet from another location.
  • xsl:iterate is used to repeatedly apply a template or instruction to the current node in the XML document, using the result of each iteration as the input for the next iteration.
  • xsl:key is used to define a named key that can be used to access nodes in the XML document based on the value of a specified attribute or element.
  • xsl:map is used to define a map that can be used to store and retrieve key-value pairs.
  • xsl:map-entry is used to define an entry in a map.
  • xsl:matching-substring is used to specify the instructions to be applied to a matching substring in a regular expression match.
  • xsl:merge is used to merge multiple sequences of nodes into a single sequence.
  • xsl:merge-action is used to specify an action to be performed on a node in the XML document during a merge operation.
  • xsl:merge-key is used to specify the key to be used for grouping nodes during a merge operation.
  • xsl:merge-source is used to specify the source from which nodes will be taken during a merge operation.
  • xsl:message is used to display a message in the output of the transformation.
  • xsl:mode is used to specify a mode for template matching.
  • xsl:namespace is used to specify a namespace to be used in the output of the transformation.
  • xsl:namespace-alias is used to specify a namespace alias to be used in the output of the transformation.
  • xsl:next-iteration is used to specify that the current iteration in an xsl:iterate instruction should be terminated and the next iteration should be started.
  • xsl:next-match is used to specify that the next matching template should be applied to the current node in the XML document.
  • xsl:non-matching-substring is used to specify the instructions to be applied to a non-matching substring in a regular expression match.xsl:number is used to generate formatted numbers in the output of the transformation.
  • xsl:on-completion is used to specify instructions to be executed when the transformation is completed.
  • xsl:on-empty is used to specify instructions to be executed if the result of an XPath expression is empty.
  • xsl:on-non-empty is used to specify instructions to be executed if the result of an XPath expression is not empty.
  • xsl:otherwise is used in conjunction with xsl:choose to specify the instructions to be applied if none of the xsl:when elements evaluate to true.
  • xsl:output is used to specify the output method, encoding, and other characteristics of the result of the transformation.
  • xsl:output-character is used to specify a character to be output in the result of the transformation.
  • xsl:override is used to override the instructions specified in a imported or included stylesheet.
  • xsl:package is used to define a package of XSLT stylesheets and functions that can be imported and used in other stylesheets.
  • xsl:param is used to define a parameter that can be passed to a stylesheet or a function.
  • xsl:perform-sort is used to sort a sequence of nodes in the XML document.
  • xsl:preserve-space is used to specify that white space in the XML document should be preserved in the output of the transformation.
  • xsl:processing-instruction is used to create a processing instruction in the output of the transformation.
  • xsl:result-document is used to specify the creation of a new result document during the transformation.
  • xsl:sequence is used to create a sequence of nodes or atomic values.
  • xsl:sort is used to specify the sort criteria for a sequence of nodes.
  • xsl:source-document is used to specify the creation of a new source document during the transformation.
  • xsl:strip-space is used to specify that white space in the XML document should be stripped from the output of the transformation.
  • xsl:stylesheet is the root element of an XSLT stylesheet, which defines the rules for transforming the XML document.
  • xsl:template is used to specify a template that can be applied to a node in the XML document.
  • xsl:text is used to create text in the output of the transformation.
  • xsl:transform is used to specify the version and other characteristics of the XSLT stylesheet.
  • xsl:try is used to specify instructions that may fail and to specify instructions to be executed if the instructions specified in the xsl:try element cannot be executed.
  • xsl:use-package is used to import a package of XSLT stylesheets and functions.
  • xsl:value-of is used to insert the value of an XPath expression in the output of the transformation.
  • xsl:variable is used to define a variable that can be used in an XPath expression or in the instructions of a stylesheet or function.
  • xsl:when is used in conjunction with xsl:choose to specify a condition to be evaluated and the instructions to be applied if the condition is true.
  • xsl:where-populated is used to specify that a template or instruction should only be applied to the current node in the XML document if the result of an XPath expression is not empty.
  • xsl:with-param is used to pass a parameter to a template or a function.

XSLT Reference