Re: [xml] FW: [xsl] Problem with xsl:sort and German Umlauts with libxslt



On Thu, Apr 11, 2002 at 06:50:53AM -0700, David Santamauro wrote:
FYI

-----Original Message-----
From: owner-xsl-list lists mulberrytech com
[mailto:owner-xsl-list lists mulberrytech com]On Behalf Of Joachim
Seibert
Sent: Tuesday, April 02, 2002 3:09 AM
To: xsl-list lists mulberrytech com
Subject: [xsl] Problem with xsl:sort and German Umlauts with libxslt


Hi all,

I have got a problem while sorting german text.

I want to sort thess country names:

<country>Deutschland</country>
<country>Ägypten</country>
<country>Zypern</country>

After using

<xsl:for-each select="country"><xsl:sort select="."/></xsl:for-each>

the list ends up in the following order:

Deutschland
Zypern
Ägypten

which is not the right german alphabetic sorting.
As I read in XSLT-Programmers reference (by Michael Kay), this is the
swedish way to sort?!

For the XSL-Transformation I use libxslt-1.0.14 under FreeBSD 4.3.

Do I have to use the lang-attribute for xsl:sort?
I read in the libxslt manual, that the lang-attribute ist not supported by
libxslt,
but how can I solve this problem?
Does the newer gdome2 has language-specific sorting support?

Any suggestions for that?

  You're not the first one to raise the issue of alphabetic sorting order.
As a pramble I do not want the current locale setting to influence it,
locales are bad, broken and turn what should be reliable computing tools
into unpredictable mess.
That said if someone can explain how the sorting algorithm should
really work with and without lang-attribute, then I may update the
XSLT implementation to follow it.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]