[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Two-level grouping problem


Subject: Re: [xsl] Two-level grouping problem
From: "Aron Bock" <aronbock@xxxxxxxxxxx>
Date: Wed, 11 May 2005 02:56:26 +0000

Yes, this is the goal, but to achieve this using generate-id() we're relying on an [implicit] order to $rows, no?

No, grouping works using any test that succeeds only once for each unique value. Since there is always a node with the true predicate [last()] and there is always a node with the true predicate [1] then either one could be used ... and in XSLT 1.0 functions like generate-id() will act on only the first node in document order.

The "no?" in my response was rhetorical.


But, the point was already made, "the important bit ... only one ... regardless of where in the document orer" ... so, it really is regardless of where in the document order, as long as it is a test that can be calculated for each unique value found in a set. For example, the predicate [2] would not work because there could be values in the set for which there is but one member.

IMO the point wasn't made (that nodes in RHS are expected to be in predictable order), and the "regardless of where in the document..." quoted above referred to the [current] node in the LHS.


Regards,

--A

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



Current Thread
Keywords