This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Problem raised by Vladimir Nestorovsky today on the xsl-list at mulberrytech. The specification of xsl:for-each-group is unclear as to the order of items in each group (that is, the result of current-group()). The intent is that the procedural algorithm given for each of the four grouping methods defines this order. But this relies on understanding that when an item is "added" to a group, or "assigned" to a group, it is added at the end of the sequence, which isn't explicitly stated. Suggestion: in the rules for the four grouping methods, change "added" and "assigned" to "appended", and add a sentence at the end saying that the order in which items are added to each group determines the order of the items in the group as returned by the current-group() function.
The proposal in comment #0 has been approved in principle; an erratum will be drafted.
Erratum E43 will be raised as proposed.
I chose what I think is a simpler but equivalent solution: adding the paragraph: In all cases the items within a group remain in population order. That is, if items <var>A</var> and <var>B</var> are in the same group, then <var>A</var> will precede <var>B</var> in the group if <var>A</var> preceded <var>B</var> in the population.