xsl-list
[Top] [All Lists]

RE: [xsl] sorting strings question

2010-03-18 07:32:29

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 


--~------------------------------------------------------------------
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>