Bug #2158

Rejecting version="1.1" in xsl:stylesheet

Added by Michael Kay over 5 years ago. Updated about 4 years ago.

XSLT conformance
Start date:
Due date:
% Done:


Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:


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.

#3 Updated by O'Neil Delpratt over 5 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to

Bug fix applied to the maintenance release Saxon

#4 Updated by O'Neil Delpratt about 4 years ago

  • Sprint/Milestone set to
  • Applies to branch 9.6 added
  • Fix Committed on Branch 9.6 added
  • Fixed in Maintenance Release added

Please register to edit this issue

Also available in: Atom PDF