[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: xsl:sort clarification

Subject: RE: xsl:sort clarification
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 23 Aug 2005 00:12:23 +0100
RE:  xsl:sort clarification
> 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

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.