RE: [xsl] sorting strings question

Subject: RE: [xsl] sorting strings question
From: "Robby Pelssers" <robby.pelssers@xxxxxxxxx>
Date: Thu, 18 Mar 2010 13:55:51 +0100
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: [xsl] 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