xsl-list
[Top] [All Lists]

RE: xsl:sort clarification

2005-08-22 16:12:23
That does appear to be what it says, and surprisingly enough that does
appear to be intentional, the xslt2 draft has the same wording but
follows it by a clarifying note:

If two items have equal sort key values, and the sort is 
stable, then
their order in the sorted sequence will be the same as 
their order in
the initial sequence, regardless of whether order="descending" was
specified on any or all of the sort key components.

Yes. The key point here is "any or all": there can be more than one sort key
[component]. If all the sort keys are equal, and some of them are ascending
while others are descending, what order would you want for the duplicates?
In effect, there is an extra (N+1th) sort key, whose value is the position
in the initial sequence.

Michael Kay
http://www.saxonica.com/ 



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>