xsl-list
[Top] [All Lists]

RE: [xsl] Problem with xsl:sort and German

2009-08-10 21:20:55

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]), 
'aäbcdefghijklmnoöpqrsßtuüvwxyz.-_,()[]/:;&quot;?''', 
'AÄBCDEFGHIJKLMNOÖPQRSß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)
Bäte, 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...
Bäte, 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

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



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