This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 30131 - [xslt30ts] merge-051 and merge-082 use position() in xsl:merge-key
Summary: [xslt30ts] merge-051 and merge-082 use position() in xsl:merge-key
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 3.0 Test Suite (show other bugs)
Version: Proposed Recommendation
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Abel Braaksma
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
Reported: 2017-06-21 23:15 UTC by Michael Kay
Modified: 2017-06-22 09:08 UTC (History)
0 users

See Also:


Description Michael Kay 2017-06-21 23:15:10 UTC
Tests merge-051 and merge-082 use <xsl:merge-key select="position()"/> expecting the merge keys to be a monotonic sequence of integers 1..N.

However, we state in ยง15.5 that a merge key is evaluated with a singleton focus, so the value of position() will always be 1.

Unfortunately this invalidates what the tests are trying to achieve, which is simple pairwise merging of two input sequences.

The functionality can be achieved, but less conveniently, using accumulator values as the grouping keys.
Comment 1 Michael Kay 2017-06-22 09:08:11 UTC
I have changed tests merge-051 and merge-082 to use accumulators instead of calling position(), and I have added a new test merge-092 (inspired by a Saxon bug report from Martin Honnen) that checks that the merge key is indeed evaluated with a singleton focus.