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

RE: sorting strings question

Subject: RE: sorting strings question
From: "Robby Pelssers" <robby.pelssers@xxxxxxxxx>
Date: Thu, 18 Mar 2010 13:55:51 +0100
RE:  sorting strings question
I found my mistake... i was sorting on a complex node instead of a = textnode
which was 1 level deeper (childnode).

So default sorting does the trick like you all pointed out.

Thx for the tip.

Robby

-----Original Message-----
From: Michael Kay [mailto:mike@xxxxxxxxxxxx]
Sent: Thursday, March 18, 2010 1:32 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  sorting strings question

>
> I have a concrete example:
>
> When I have following strings ['BSS84/A2', 'BSS84/DG', 'BSS84'],
>
> default sorting results in:
>
> BSS84/A2 -> BSS84/DG -> BSS84
>

That's a very strange result; all the usual collations sort A before B if A
is a leading substring of B. But it's not against the XSLT rules, as far as
I can tell.

The key point is that collating is product-dependent, so there's not much
point asking the question without defining what product you are using.

In XSLT 2.0 the only "standard" collation is the Unicode codepoint
collation, and that's consistent with the order you are wanting.

Also, giving three data points and saying how they should appear isn't
enough data to allow the general rules to be inferred.

Regards,

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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.