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

RE: Problem with xsl:sort and German

Subject: RE: Problem with xsl:sort and German
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Tue, 11 Aug 2009 02:20:27 +0100
RE:  Problem with xsl:sort and German
The details of collations are product specific. I'll do my best to answer
your post on the saxon-help thread at



Michael Kay

> Hi all:
> I'm experiencing some problems with German and sorting. In
> researching I found that there have been similar problems in
> the past which seem unresolved (see  Problem with
> xsl:sort and German Umlauts with libxslt). Was this issue
> ever resolved?
> I'm using xsl 1.0 and the Saxon-B transformer (rather
> than the libxslt). I believe I have told the xslt to sort
> using German (i.e. lang='de'). My sort statement looks like this:
> <xsl:sort select="translate(normalize-space((
> analytic/author/text()[normalize-space()],
> monogr/author/text()[normalize-space()],
> analytic/title/text()[normalize-space()],
> monogr/editor/text()[normalize-space()],
> monogr/title/text()[normalize-space()],
> monogr/meeting/text()[normalize-space()] )[1]),
> 'adbcdefghijklmnovpqrs_tu|vwxyz.-_,()[]/:;&quot;?''',
> 'ADBCDEFGHIJKLMNOVPQRS_TU\VWXYZ')" lang="de" order="ascending"/>
> As you can see a translate function is being used to remove
> unwanted characters such as punctuation.
> Letters with umlauts are not correctly sorted. In this case
> the umlauts are ignored and the letters are treated as plain letters.
> (e.g. incorrectly sorted)
> Bdte, Ludwig...
> Batt, Kurt...
> What would be desirable is to sort the letters with umlauts
> to positions that directly follow their siblings without umlauts.
> (e.g. - desired sorting)
> Batt, Kurt...
> .
> .
> Bayer, Kurt...
> Bdte, Ludwig...
> Similarly the _ (ess-zett) character is not being properly
> sorted, appearing before entries with the letter s.
> (e.g. -incorrectly sorted)
> Ba_ler, Moritz...
> Bastian, [Horst]...
> Bastian, Horst and Bernhard Blaschke...
> This character should appear after s.
> (e.g. -correctly sorted)
> Bastian, [Horst]...
> Bastian, Horst and Bernhard Blaschke...
> Ba_ler, Moritz...
> Any advice regarding where I have gone wrong with my xslt
> would be greatly appreciated. Many thanks in advance.
> Regards,
> Jacob Jett

Current Thread


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