Bug #5563
closed
SaxonJS allows elements in supposedly empty xsl:copy-of instruction
Category:
XSLT Conformance
Applies to JS Branch:
2, Trunk
Fix Committed on JS Branch:
2, Trunk
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.
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.
- Priority changed from Low to High
- Sprint/Milestone changed from SaxonJS 2.4 to SaxonJS 3.0
Added XSLT3 test cases copy-0104 and copy-0105.
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.
- 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.)
- Sprint/Milestone set to SaxonJS 2.5
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to SaxonJS 2.5
Please register to edit this issue
Also available in: Atom
PDF
Tracking page