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
Specifies an id for this stylesheet. This is most often used when the stylesheet is embedded in another XML document.
extension-element-prefixes
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.

Specifications

XSLT, section 2.2.

Specification Status Comment
Unknown Unknown Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support 1Edge Full support 12Firefox Full support 1.5IE Full support YesOpera Full support YesSafari Full support 3WebView Android Full support 1Chrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support 3Samsung Internet Android ?
exclude-result-prefixesChrome ? Edge ? Firefox Full support YesIE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android Full support YesOpera Android ? Safari iOS ? Samsung Internet Android ?
extension-element-prefixesChrome ? Edge ? Firefox No support NoIE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android No support NoOpera Android ? Safari iOS ? Samsung Internet Android ?
idChrome ? Edge ? Firefox Partial support 7
Notes
Partial support 7
Notes
Notes Supported only if explicitly called out by an inline DTD.
IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android Partial support 7
Notes
Partial support 7
Notes
Notes Supported only if explicitly called out by an inline DTD.
Opera Android ? Safari iOS ? Samsung Internet Android ?
versionChrome Full support 1Edge Full support 12Firefox Full support 1.5IE Full support YesOpera Full support YesSafari Full support 3WebView Android Full support 1Chrome Android Full support 18Edge Mobile Full support 12Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support 3Samsung Internet Android ?

Legend

Full support  
Full support
Partial support  
Partial support
No support  
No support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.

Document Tags and Contributors

Contributors to this page: ExE-Boss, SphinxKnight, Sheppy, Fredchat, Ptak82, Nickolay, CitizenK
Last updated by: ExE-Boss,