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 4589 - [XSLT 2.0]Effect of stable="no" when sorting groups
Summary: [XSLT 2.0]Effect of stable="no" when sorting groups
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 2.0 (show other bugs)
Version: Recommendation
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-29 17:00 UTC by Michael Kay
Modified: 2007-10-10 21:43 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2007-05-29 17:00:28 UTC
An xsl:sort element may appear as a child of xsl:for-each-group, and defines how the groups are sorted.

It's not clear what happens if the first such xsl:sort specifies stable="no". Section 14.3 (Grouping) says "If two groups have the same values for all their sort key components, they are processed in order of first appearance." But section 13 (Sorting) suggests that this is not guaranteed in the case where stable="no" is specified.

Proposed resolution: stable="no" should mean what it says, and 14.3 should change to say "If two groups have the same values for all their sort key components, they are processed in order of first appearance if the sort is *stable* [link to termdef] or in an implementation-dependent order otherwise."
Comment 1 Michael Kay 2007-06-21 16:42:51 UTC
The WG discussed this on 21 Jun 2007 and agreed to make the proposed editorial change.
Comment 2 Michael Kay 2007-06-21 17:23:05 UTC
Erratum E8 has been drafted.