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



Daniel Veillard wrote:

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

As I read in XSLT-Programmers reference (by Michael Kay), this is the
swedish way to sort?!

Not Swedish per se (although the swedes may use that particular
sorting order). The default sorting order is defined by the value
of the character. In your case (assuming ISO-8859-1) the initial
character of each country is D = 68, Z = 90, and Ä = 196.

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.

You just need to re-implement the locales ;)

Each language has its own sorting order defined by their respective
locale. This includes a definition of equivalence classes (characters
which are rated the same during a sort), and collation characters
(multiple characters which are to be handled as one, e.g. the German
double-s). You can find further information at

  http://www.opengroup.org/onlinepubs/7908799/xbd/locale.html
  http://www.unicode.org/unicode/reports/tr10/

I think that the size of these documents speak for themselves, so I
shall refrain from further comments about the sanity of doing such
an implementation.



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