[Bug 5295] [XSLT 2.0] xsl:for-each-group: transitivity

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5295





------- Comment #1 from mike@saxonica.com  2007-12-18 18:45 -------
The spec states that current-grouping-key() returns the grouping key of the
initial item in a group (that is, the item that is first in population order).
I suggest therefore that we define that grouping is done as if the items are
processed in population order and each successive item is processed as follows:
if its grouping key is equal to that of the initial item in some group, then
the item is added to that group; otherwise the item becomes the initial item in
a new group.

This ensures that (a) each group will have a distinct value for
current-grouping-key(), and (b) every item in a group will have a grouping key
that is equal to the current-grouping-key() for that group. It does not ensure
that X and Y are in the same group if and only if their grouping keys are
equal.

Received on Tuesday, 18 December 2007 18:45:58 UTC