Name
<xsl:stylesheet>
The root element of an XSLT stylesheet. It is identical
to the <xsl:transform>
element, which was included in the XSLT specification for historical
purposes.
Category
Contains the entire stylesheet.
Required Attributes
versionIndicates the version of XSLT that the stylesheet requires. For XSLT version 1.0, its value should always be
1.0. As later versions of the XSLT specification are defined, the required values for theversionattribute will be defined along with them.[2.0] In XSLT version 2.0, this value should be
2.0. The XSLT 2.0 spec defines stricter rules for handling theversionattribute than the XSLT 1.0 spec. To avoid complications, you should use the values1.0and2.0.XSLT 2.0 also allows you to specify the
versionattribute on any XSLT element. If you want to use version 1.0 processing for a given portion of your stylesheet, you can defineversion="1.0"for that portion of the stylesheet. For example, the<xsl:decimal-format>element works differently in XSLT 2.0, so you could use<xsl:decimal-format version="1.0">to process the element according to the rules of XSLT 1.0.xmlns:xslDefines the URI for the XSL namespace. For both XSLT version 1.0 and XSLT version 2.0, this attribute’s value must be
http://www.w3.org/1999/XSL/Transform. (Although this is a namespace declaration, not an attribute, it is required. Your stylesheet won’t work without it.)
Optional Attributes
idDefines an ID for this stylesheet.
extension-element-prefixesDefines any namespace ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access