- From: <bugzilla@jessica.w3.org>
- Date: Wed, 19 Jul 2017 15:21:56 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=30152 Bug ID: 30152 Summary: [xslt30ts] Copying accumulator values Product: XPath / XQuery / XSLT Version: Proposed Recommendation Hardware: PC OS: All Status: NEW Severity: normal Priority: P2 Component: XSLT 3.0 Test Suite Assignee: abel.online@xs4all.nl Reporter: mike@saxonica.com QA Contact: public-qt-comments@w3.org Target Milestone: --- In test accumulator-063 et seq I attempted to create some tests for the rules regarding copying of accumulator values in ยง18.2.10. For example -063 has the code: <xsl:template match="b"> <xsl:variable name="x"> <xsl:copy-of select="." copy-accumulators="yes"/> </xsl:variable> <xsl:for-each select="$x/*"> <b-acc>{accumulator-before('f:elementNr')}</b-acc> </xsl:for-each> </xsl:template> Looking at this again, I don't think this has the intended effect. xsl:copy creates a copy of the b element with copied accumulator values, but this element is then attached to a document node constructed for the variable $x, and this (under rule 11 of Constructing Complex Content) does not copy the accumulator values to the new documnt node. Although this might seem surprising, the alternative would be worse: consider <xsl:variable name="x"> <a/> <xsl:copy-of select="." copy-accumulators="yes"/> <b/> </xsl:variable> and ask what the accumulator value should be for element b. I will rewrite the tests accordingly. Since I misunderstood the effect of the spec here, others might also do so, and a word of explanation in an erratum might not go amiss. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Wednesday, 19 July 2017 15:21:59 UTC