GNOME Bugzilla – Bug 573327
Sort items according to @lang xsl:sort attribute in Esperanto
Last modified: 2012-11-03 15:40:38 UTC
+++ This bug was initially created as a clone of Bug #553560 +++ Please describe the problem: xsl:sort lang="eo" is not sorting correct because it's not using eo locale. Steps to reproduce: 1. l.xml: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="l.xsl"?> <lingvoj> <lingvo>jida</lingvo> <lingvo>joruba</lingvo> <lingvo>ĝuanga</lingvo> <lingvo>ĉina</lingvo> <lingvo>zulua</lingvo> </lingvoj> 2. l.xsl: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method='text' encoding='UTF-8'/> <xsl:template match="/">Lingvoj:<xsl:for-each select="lingvoj/lingvo"> <xsl:sort lang="eo-us" select="."/> <xsl:text> </xsl:text> <xsl:value-of select="."/> </xsl:for-each> <xsl:text> </xsl:text> </xsl:template> </xsl:stylesheet> 3. xsltproc l.xsl l.xml Actual results: Lingvoj: jida joruba zulua ĉina ĝuanga Expected results: Lingvoj: ĉina ĝuanga jida joruba zulua Does this happen every time? Yes Other information: GNU libc supports Esperanto "eo" as locale, with your patch it works fine. But GNU libc does not distribute eo locale. It is missing in http://sourceware.org/cgi-bin/cvsweb.cgi/libc/localedata/locales/?cvsroot=glibc But there is "i18n" (without a region). And localedef has no problem. I will ask to put eo in glibc, that will be the best solution.
Created attachment 130905 [details] [review] Patch against trunk
On some systems the Esperanto locale is simply named eo.utf8 without a country code. On other systems it's named eo_US.utf8, but this hasn't been added to xsltDefaultRegion. The patch in the previous comment should fix both cases. I only tested the eo.utf8 locale of Ubuntu 8.10.
Your patch is against revision 1494 but in http://svn.gnome.org/viewvc/libxslt/trunk/libxslt/xsltlocale.c?view=log the last revision is Revision 1489. Do I use the wrong repository?
The patch is against version 1489 of xsltlocale.c. I think the 1494 mentioned in the patch is just the revision of the top-level trunk directory.
Sorry for the stupid question :( The patch works for me. Will it be commited to the trunk later? That would be great.