[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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 http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|