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.

Defined

XSLT, section 2.2.

Specifications

Specification Status Comment
Unknown Unknown Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support1121.5 Yes Yes3
exclude-result-prefixes ? ? Yes ? ? ?
extension-element-prefixes ? ? No ? ? ?
id ? ?71 ? ? ?
version1121.5 Yes Yes3
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support118124 Yes3 ?
exclude-result-prefixes ? ? ? Yes ? ? ?
extension-element-prefixes ? ? ? No ? ? ?
id ? ? ?71 ? ? ?
version118124 Yes3 ?

1. Supported only if explicitly called out by an inline DTD.

Document Tags and Contributors

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