And the collation trick also solved another problemette, where a composer called Bru#269;i (it's c with an inverted circumflex) sorted ahead of Bruckner.
Tx again, G.
----- Original Message -----
From: Michael Kay
Sent: Thursday, March 11, 2004 5:12 PM
Subject: RE: [saxon] Sorting on Strings

Wouldn’t a simpler solution be to translate(xxx, ‘ ‘, ‘_’) – i.e. replace spaces by underlines?


The “correct” solution in Java is probably to set up your own RuleBasedCollator, but I have to confess it’s a lot of work.


On the other hand, wouldn’t you get the right answer simply by invoking the Unicode code-point collation,


<xsl:sort select=”…” collation=””/>




Michael Kay


From: [] On Behalf Of Graeme St.Clair
Sent: 11 March 2004 21:29
Subject: [saxon] Sorting on Strings


I found a circumvention for my post of 7 Mar.  Most of my 'catalog' values were things like 'G  4' or 'BWV1063'.  And I thought the suggestion at might help, if I made sure that all catalog values contained a blank - then I could sort similarly to data-type="number" select="substring-after(.,' ')".  Alas, catalog values for the too-prolific Telemann look like '53 F: 1', meaning the first concerto for 3 instruments in the key of F.  I finally settled for:-


 <xsl:sort data-type="text" ... select="translate(detail/@catalog,


Not especially elegant, but it seems to work.