diff --git a/specifications/xslt-40/src/xslt.xml b/specifications/xslt-40/src/xslt.xml index f69350176..b50d214a8 100644 --- a/specifications/xslt-40/src/xslt.xml +++ b/specifications/xslt-40/src/xslt.xml @@ -6819,9 +6819,17 @@ and version="1.0" otherwise.

The effective version of an element in a or is the decimal value of the [xsl:]version attribute (see ) on that element or on the innermost - ancestor element that has such an attribute, excluding the version - attribute on an xsl:output element.

-

+ ancestor element that has such an attribute, subject + to special rules for the xsl:output and xsl:fallback + elements.

+

These rules do not apply to the xsl:output element, whose + version attribute has an entirely different purpose: it is used to + define the version of the output method to be used for serialization. + The of an xsl:output element + is the effective version of its parent element.

+

There are additional rules for an xsl:fallback element: see + .

+

An element is processed with backwards compatible behavior if its effective version is less than @@ -6867,9 +6875,7 @@ and version="1.0" otherwise.

-

These rules do not apply to the xsl:output element, whose - version attribute has an entirely different purpose: it is used to - define the version of the output method to be used for serialization.

+ @@ -7152,6 +7158,34 @@ and version="1.0" otherwise.

a separate module from the package manifest, and using the separate module as the version of the stylesheet that is presented to a 2.0 processor.

+

For an XSLT 4.0 processor, the of an + xsl:fallback element that has no explicit version attribute + is 4.0: more generally, it is the version of XSLT supported by the processor. + This rule is designed to ensure that the xsl:fallback element + itself is not processed with , + which would be pointless since the whole purpose of the instruction is to provide + code that can be evaluated with an earlier version of XSLT.

+ + +

This rule was not present in earlier versions of this specification. + On a strict reading of the XSLT 3.0 specification, for example, an xsl:fallback + instruction with no version attribute is evaluated with forwards compatible + behavior. This means, for example, that if the stylesheet author writes + ]]> (which is incorrect, because + the instruction does not define a select attribute) then the select + attribute will simply be ignored.

+ +

Stylesheet authors can prevent this problem by adding an explicit + version attribute to xsl:fallback indicating the version + of XSLT that is needed to evaluate the fallback code.

+ +

This specification cannot retrospectively dictate what XSLT 3.0 (or earlier) + processors should do; however, developers of such processors are encouraged to adopt + this rule, so that in an XSLT 4.0 stylesheet, an xsl:fallback instruction + that cannot be properly evaluated by an XSLT 3.0 processor is rejected rather than + being silently ignored.

+
+ Combining Stylesheet Modules @@ -39268,6 +39302,7 @@ See

The xsl:matching-substring and xsl:non-matching-substring elements within xsl:analyze-string may take a select attribute in place of a contained sequence constructor.

+

Simplified stylesheets no longer require an xsl:version attribute (which means they might not need a declaration of the XSLT namespace). Unless otherwise specified, a 4.0 simplified stylesheet defaults expand-text to true.

@@ -39277,9 +39312,16 @@ See transformation of JSON data structures (trees of maps and arrays) to work in the same way as with XML-derived data structures.

+

The streamability rules for accumulators have been relaxed, so that the phase="end" processing has access to the full subtree of the matched node.

+

The of an xsl:fallback + instruction with no version attribute is the version of XSLT supported + by the processor, so that the xsl:fallback is not itself processed + using .

+ +