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

version

Indicates 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 the version attribute will be defined along with them.

xmlns:xsl

Defines the URI for the XSL namespace. For XSLT Version 1.0, this attribute’s value should be http://www.w3.org/1999/XSL/Transform. Note that most XSLT processors will give you a warning message if your xmlns:xsl declaration does not have the proper value.

Optional Attributes

id

Defines an ID for this stylesheet.

extension-element-prefixes

Defines any namespace prefixes used to invoke extension elements. Multiple namespace prefixes are separated by whitespace.

exclude-result-prefixes

Defines namespace prefixes that should not be sent to the output document. Multiple namespace prefixes are separated by whitespace.

Content

This element contains the entire stylesheet. The following items can be children of <xsl:stylesheet>:

  • <xsl:import>

  • <xsl:include>

  • <xsl:strip-space>

  • <xsl:preserve-space>

  • <xsl:output>

  • <xsl:key>

  • <xsl:decimal-format>

  • <xsl:namespace-alias>

  • <xsl:attribute-set>

  • <xsl:variable>

  • <xsl:param>

  • <xsl:template>

Appears in

None. <xsl:stylesheet> is the root element of the stylesheet. ...

Get XSLT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.