Name

<xsl:stylesheet>

Synopsis

The <xsl:stylesheet> element is the root element for XSLT stylesheets. The contents of this element must first contain any <xsl:import> elements, followed by any other top-level elements in any order. <xsl:stylesheet> uses the following attributes:

version

The version number of XSLT used by the style sheet.

xmlns:xsl

This attribute contains a standard namespace declaration that maps the prefix xsl to the namespace URI http://www.w3.org/1999/XSL/Transform. The prefix can be changed if necessary. This attribute is technically optional, but de facto required.

id

Any XML name that’s unique within the style sheet and is of type ID.

extension-element-prefixes

A whitespace-separated list of namespace prefixes used by extension elements in this document.

exclude-result-prefixes

A whitespace-separated list of namespace prefixes whose declarations should not be copied into the output document. If a namespace is needed in the output, it will be copied regardless.

<xsl:stylesheet
   version = "number"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   [id = "id"]
   [extension-element-prefixes = "prefix1 prefix2..."]
   [exclude-result-prefixes = "prefixa prefixb..."]>
   ...
</xsl:stylesheet>

Get Webmaster in a Nutshell, Third Edition 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.