Bug #5563
closedSaxonJS allows elements in supposedly empty xsl:copy-of instruction
100%
Description
Due to some mental mistake I wrote some XSLT code using e.g. <xsl:copy-of select="."><xsl:apply-templates/></xsl:copy-of>
and SaxonJS let met get away with it. When moving my code to SaxonJ, I found that it doesn't allow it and gives an error that xsl:copy-of
is supposed to be empty, as indeed the XSLT spec defines it.
So I suppose this is a bug in terms of XSLT comformance of SaxonJS.
Updated by John Lumley over 2 years ago
Yes - this looks like an oversight - the original 'syntax check' for xsl:copy-of
incorrectly declared the possibility of a sequence constructor child (as xsl:copy
of course is permitted, and I assume I copy-and-pasted). Interestingly there must have been no XSLT test case which checked for a compiler error in such circumstances. The runtime code appears to ignore any children however.
Updated by Norm Tovey-Walsh over 2 years ago
- Priority changed from Low to High
- Sprint/Milestone changed from SaxonJS 2.4 to SaxonJS 3.0
Updated by Michael Kay over 2 years ago
Added XSLT3 test cases copy-0104 and copy-0105.
Updated by Michael Kay over 2 years ago
XSLT-elements.xsl line 81 reads
<copy-of select="expression" copy-namespaces="boolean" copy-accumulators="boolean" type="eqname" validation="strict|lax|preserve|strip">
<sequence-constructor/>
</copy-of>
The <sequence-constructor/>
is incorrect.
Updated by Debbie Lockett over 2 years ago
- Status changed from New to Resolved
- Priority changed from High to Normal
- Sprint/Milestone deleted (
SaxonJS 3.0) - Applies to JS Branch Trunk added
- Fix Committed on JS Branch 2, Trunk added
Fix committed in XSLT-elements.xsl. (And this fix is sufficient now that bug #5555 has been resolved to regenerate XSLT-schema.xsl in the build.)
Updated by Norm Tovey-Walsh about 2 years ago
- Sprint/Milestone set to SaxonJS 2.5
Updated by Norm Tovey-Walsh about 2 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to SaxonJS 2.5
Fixed in SaxonJS 2.5.
Please register to edit this issue
Also available in: Atom PDF Tracking page