xsl:stylesheet element is always the top-level element of an XSLT stylesheet. The name
xsl:transform may be used as a synonym.
Available in XSLT 1.0 and later versions. Available in all Saxon editions.
- Content: ( declarations )
- Used to reference stylesheet modules embedded in a document.
- Standard attribute that may appear on any XSLT element. Indicates the version of XSLT required by the stylesheet.
- To request XLST 3.0 processing (which requires Saxon-PE or Saxon-EE), setting
xsl:stylesheetelement is recommended, but is not sufficient on its own. An explicit request must be made on the command line or by the API. Using the XSLT 3.0 processor, a value greater than 3.0 invokes forwards compatibility mode.
- When using the XSLT 2.0 processor (in particular, using Saxon-HE), a value greater than
2.0invokes forwards compatibility mode.
eqname | "#unnamed"
- Standard attribute that may appear on any XSLT element. Defines the default value for the mode attribute of all
xsl:apply-templateselements within its scope.
"preserve" | "strip"
- Standard attribute that may appear on any XSLT element. Defines the default value for the
validationattribute of all relevant instructions appearing within its scope. The default is
"preserve" | "strip" | "unspecified"
- Used to request stripping of type annotations. The default is
- Standard attribute that may appear on any XSLT element. Specifies the default collation used by all XPath expressions appearing in attributes or text value templates within its scope (unless overridden by another
default-collationattribute on a descendant); and used by certain XSLT constructs within its scope. If present it must be a whitespace-separated list of collation URIs, that use the scheme and path
http://www.w3.org/2013/collation/UCA(to request use of the Unicode Collation Algorithm), or collations otherwise recognized by Saxon (see Collation).
- Standard attribute that may appear on any XSLT element. Used to declare the use of extension instructions in a particular namespace.
- Standard attribute that may appear on any XSLT element. Used to designate namespaces as excluded.
- Standard attribute that may appear on any XSLT element. New in XSLT 3.0, and Saxon 9.5. If set to
yes, enables the use of text value templates - expressions enclosed in curly braces within text nodes, behaving the same way as attribute value templates in attribute nodes - for descendant text nodes (unless overridden by another
expand-textattribute on a descendant). The default is
- Standard attribute that may appear on any XSLT element. Used to conditionally include or exclude elements. The value is an XPath expression that can be evaluated statically. If the effective boolean value is false, then the element and all its descendants are effectively excluded from the stylesheet module.
- Standard attribute that may appear on any XSLT element. Determines the namespace used for any unprefixed element name or type name within an XPath expression. The value may be overridden by another
xpath-default-namespaceattribute on a descendant. The default is a zero-length string, for names in no namespace.
- Saxon attribute that may appear on any XSLT element. If the value is
yes, then at compile time Saxon outputs (to the standard error output) a representation of the optimized expression tree for the template or function containing that instruction.