Is supporting xsl:stylesheet default-validation="strict | lax" an allowed extension to XSLT?
Added by Martin Honnen almost 10 years ago
While experimenting with schema-aware transformation and Saxon 9.6 EE I found that it allows the use of the attribute values @default-validation="strict"@ and @default-validation="lax"@ on the @xsl:stylesheet@ element and behaves differently, meaning it takes it into account.
For instance
314E-2
bar
outputs a warning
Warning: on line 17 of test2015013110.xsl: There is no global element declaration for foo 314E-2 bar
while
314E-2
bar
abandons the transformation with an error
Error on line 17 of test2015013110.xsl: XTTE1512: There is no global element declaration for foo, so strict validation will fail
According to http://www.w3.org/TR/xslt-30/#stylesheet-element the allowed values are @default-validation? = "preserve" | "strip"@ and XmlPrime for instance gives a compilation error
XTSE0020: The 'default-validation' attribute of XSLT element must be 'preserve' or 'strip', but has value 'strict'.
So I wonder why Saxon supports these values.
Replies (1)
RE: Is supporting xsl:stylesheet default-validation="strict | lax" an allowed extension to XSLT? - Added by Michael Kay almost 10 years ago
Well spotted.
It seems that the values strict/lax were allowed in the 2003-11-12 draft of XSLT 2.0, and removed in the 2004-11-05 draft, and we failed to implement this change in Saxon, and it took over ten years for anyone to notice.
Will fix this in 9.7, I don't think it merits a 9.6 patch.
Please register to reply