After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 573327 - Sort items according to @lang xsl:sort attribute in Esperanto
Sort items according to @lang xsl:sort attribute in Esperanto
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-26 22:23 UTC by Wieland Pusch
Modified: 2012-11-03 15:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch against trunk (1.83 KB, patch)
2009-03-18 16:55 UTC, Nick Wellnhofer
none Details | Review

Description Wieland Pusch 2009-02-26 22:23:12 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>&#10;&#13;      </xsl:text>
        <xsl:value-of select="."/>
      </xsl:for-each>
      <xsl:text>&#10;&#13;</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.
Comment 1 Nick Wellnhofer 2009-03-18 16:55:16 UTC
Created attachment 130905 [details] [review]
Patch against trunk
Comment 2 Nick Wellnhofer 2009-03-18 16:57:00 UTC
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. 
Comment 3 Wieland Pusch 2009-03-19 19:20:46 UTC
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?
Comment 4 Nick Wellnhofer 2009-03-19 20:35:03 UTC
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.
Comment 5 Wieland Pusch 2009-03-19 22:00:21 UTC
Sorry for the stupid question :(

The patch works for me.

Will it be commited to the trunk later?

That would be great.