W3cubDocs

/XSLT & XPath

xsl:stylesheet

The <xsl:stylesheet> element (or the equivalent <xsl:transform> element) is the outermost element of a stylesheet.

Namespace Declaration

A pseudo-attribute required to identify the document as an XSLT stylesheet. Typically this is xmlns:xsl="http://www.w3.org/1999/XSL/Transform".

Syntax

<xsl:stylesheet
	version=NUMBER
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	id=NAME
	extension-element-prefixes=LIST-OF-NAMES
	exclude-result-prefixes=LIST-OF-NAMES>
		ENTIRE STYLESHEET
</xsl:stylesheet>

Required Attributes

version
Specifies the version of XSLT required by this stylesheet.

Optional Attributes

id (Supported as of 7.0 only if explicitly called out by an inline DTD.)
Specifies an id for this stylesheet. This is most often used when the stylesheet is embedded in another XML document.
extension-element-prefixes (Not supported.)
Specifies a space-separated list of any namespace prefixes for extension elements in this document.
exclude-result-prefixes
Specifies any namespace used in this document that should not be sent to the output document. The list is whitespace separated.

Type

Required outermost element of stylesheet.

Defined

XSLT, section 2.2.

Gecko support

Some support. See comments above.

© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/XSLT/stylesheet