[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] Problem with xsl:sort and German
Subject: RE: [xsl] Problem with xsl:sort and German From: Michael Kay <mike@xxxxxxxxxxxx> Date: Tue, 11 Aug 2009 02:20:27 +0100 |
The details of collations are product specific. I'll do my best to answer your post on the saxon-help thread at http://markmail.org/thread/y3u7rszwk7qxv6qq Regards, Michael Kay http://www.saxonica.com/ http://twitter.com/michaelhkay > > 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 [xsl] Problem with > xsl:sort and German Umlauts with libxslt). Was this issue > ever resolved? > > I'm using xsl 1.0 and the Saxon-B 9.1.0.6 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.-_,()[]/:;"?''', > '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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Problem with xsl:sort and, Hansjoerg Pehofer | Thread | [xsl] Using paramter "-s" with a di, Ben Stover |
RE: [xsl] Problem with xsl:sort and, Michael Kay | Date | Re: [xsl] XPath to get node with so, Andy Kohn |
Month |