The <xsl:stylesheet> element (or the equivalent <xsl:transform> element) is the outermost element of a stylesheet.
A pseudo-attribute required to identify the document as an XSLT stylesheet. Typically this is xmlns:xsl="http://www.w3.org/1999/XSL/Transform".
<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>
versionexclude-result-prefixesextension-element-prefixesdefault-collationdefault-collation attribute on an inner element. It also determines the collation used by certain XSLT constructs (such as <xsl:key> and xsl:for-each-group) within its scope.default-modemode attribute of all <xsl:template> and <xsl:apply-templates> elements within its scope.default-validationvalidation attribute of all relevant instructions appearing within its scope.expand-textidid for this stylesheet. This is most often used when the stylesheet is embedded in another XML document.input-type-annotationsuse-whenxpath-default-namespaceRequired outermost element of stylesheet.
| Specification | Status | Comment |
|---|---|---|
| XSLT 3.0 The definition of '<xsl:stylesheet>' in that specification. | Recommendation | Added the attributes default-mode, expand-text, and use-when. |
| XSLT 2.0 | Added the attributes xpath-default-namespace, default-validation, default-collation, and input-type-annotations and made all attributes except version optional. | |
| XSLT 1.0 | Initial definition |
| Desktop | ||||||
|---|---|---|---|---|---|---|
stylesheet |
1 | 12 | 1.5 | Yes | Yes | 3 |
exclude-result-prefixes |
? | ? | Yes | ? | ? | ? |
extension-element-prefixes |
? | ? | No | ? | ? | ? |
id |
? | ? | 7
|
? | ? | ? |
version |
1 | 12 | 1.5 | Yes | Yes | 3 |
| Mobile | ||||||
|---|---|---|---|---|---|---|
stylesheet |
1 | 18 | 4 | Yes | 3 | 1.0 |
exclude-result-prefixes |
? | ? | Yes | ? | ? | ? |
extension-element-prefixes |
? | ? | No | ? | ? | ? |
id |
? | ? | 7
|
? | ? | ? |
version |
1 | 18 | 4 | Yes | 3 | 1.0 |
© 2005–2020 Mozilla 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