The Extensible Stylesheet Language (XSL) comprises two separate XML applications for transforming and formatting XML documents.
An XSL transformation applies rules to a tree read from an XML document to transform it into an output tree written as an XML document.
An XSL template rule is an xsl:template
element with a match
attribute. Nodes in the
input tree are compared against the patterns of the
match
attributes of the different template
elements. When a match is found, the contents of the
template are output.
The value of a node is a pure text (no markup) string
containing the contents of the node. This can be calculated
by the xsl:value-of
element.
The xsl:apply-templates
element continues
processing the children of the current node
The xsl:if
element produces output if, and
only if, its test
attribute is true.
The xsl:number
element inserts the number
specified by its value
attribute into the
output using a specified number format given by the
format
attribute.
The
xsl:sort
element can reorder the input nodes
before copying them to the output.