Re: [xsl] sort and collating sequence

Subject: Re: [xsl] sort and collating sequence
From: "W. Eliot Kimber" <eliot@xxxxxxxxxx>
Date: Mon, 25 Feb 2002 22:30:00 -0600
Jeff Kenton wrote:
> 
> xsl:sort gives "dictionary order", so what you see is according to
> specification.  As programmers we are used to sorting by ASCII code, but
> this is intentionally different.

In the Java domain (e.g., Saxon, Xalon) you can use Java's built-in
Collator objects to customize sorting in any way you need. For example,
the ICU4J package from IBM provides a number of custom locale-specific
collators for that are not included in Java (at least not in Java 1.3,
they may be in 1.4, I don't know). The syntax for customizing Java
collators is pretty straight forward and it's pretty easy to get the
collation rules from a built-in collator and tweak it. I've had to do
this in order to support back-of-the-book indexing for some challenging
languages, such as Traditional and Simplified Chinese (although the
ICU4J package made my job much easier). 

Cheers,

Eliot
-- 
W. Eliot Kimber, eliot@xxxxxxxxxx
Consultant, ISOGEN International

1016 La Posada Dr., Suite 240
Austin, TX  78752 Phone: 512.656.4139

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread