Rejecting version="1.1" in xsl:stylesheet
Saxon 9.6 is failing when the stylesheet specifies version="1.1" (saying the version must be 0, 2, or 3; though it actually allows 1).
Revealed by the "original" test suite test axes046, etc.
#1 Updated by Michael Kay over 5 years ago
- Project changed from Saxon - Internal to Saxon
- Category set to XSLT conformance
- Found in version set to 9.6
Note: the spec says this:
If the effective version is any other value less than 3.0, the recommended action is to report a static error; however, processors may recognize such values and process the element in an implementation-defined way.
XSLT 1.0 allowed the version attribute to take any decimal value, and invoked forwards compatible processing for any value other than 1.0. XSLT 2.0 allowed the attribute to take any decimal value, and invoked backwards compatible (i.e. 1.0-compatible) processing for any value less than 2.0. Some stylesheets may therefore be encountered that use values other than 1.0 or 2.0. In particular, the value 1.1 is sometimes encountered, as it was used at one stage in a draft language proposal.
For compatibility with previous Saxon releases, I think it's best to treat version="1.1" the same as version="1.0".
#2 Updated by Michael Kay over 5 years ago
- Status changed from New to Resolved
A patch has been committed and tested on the 9.6 and 9.7 branches. The effect of the patch is to treat version="1.1" (and any other value less than 2.0) as version="1.0", with a warning, and to treat any value >2.0 and <3.0 as version="2.0", also with a warning. The latter isn't actually confomant with the 2.0 spec, but it's conformant with 3.0 and is a reasonable thing to do given that there will never be such an XSLT version.
Please register to edit this issue