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 143383 - xsl:sort attributes 'lang' and 'case-order' ignored
xsl:sort attributes 'lang' and 'case-order' ignored
Status: VERIFIED WONTFIX
Product: libxslt
Classification: Platform
Component: general
1.1.6
Other Windows
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2004-05-30 07:20 UTC by Andreas Lang
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
xsl:sort test bed (xml, dtd, xsl) (1.33 KB, application/x-zip-compressed)
2004-05-31 06:11 UTC, Andreas Lang
Details
Test data (483 bytes, application/octet-stream)
2004-07-06 16:23 UTC, Simon Woodward
Details

Description Andreas Lang 2004-05-30 07:20:41 UTC
(testing done with libxslt-1.1.6 / libxml2-2.6.9 under W2K)

lang="xx" and case-order="lower-first" /case-order="upper-first" don't show any 
effect. sorting seems to be done by character code position only.

example: with lang="de" and case-order="lower-first" xsl:sort should sort
  a A ä Ä b B ... z Z
but yields
  A B ... Z a b ... z Ä ä

this, I'm very sorry to say, makes libxslt plain unusable in any non-english 
context. any plans for fixing this in upcoming versions?

http://www.rostra.dk/alphabet/alpha_en.htm gives a good overview about 
culturally expected sort results, gory details in 
http://www.unicode.org/unicode/reports/tr10/

TIA, andreas
Comment 1 John Fleck 2004-05-30 19:24:18 UTC
Could you attach a minimal test case? Thanks.
Comment 2 Andreas Lang 2004-05-31 06:11:10 UTC
Created attachment 28185 [details]
xsl:sort test bed (xml, dtd, xsl)
Comment 3 Daniel Veillard 2004-06-29 07:19:57 UTC
Well "plain unusable" for you, lots of people have been using it
without. If you look at the amount of data/code needed to implement this,
this is huge. We are not tempted to add this, if you
have a patch and can make it in a reasonable size why not, otherwise
it's unlikely. ICU is the only software I could fount which might 
implement those orderings and it's itself 2 times bigger than both
libxml2 and libxslt together :-(

On the other hand there is an API to plug new sort routines precisely
because of that limitation and an example to plug the ICU library for this.
See the discussion thread ending in:
 http://mail.gnome.org/archives/xslt/2002-November/msg00093.html

So the status quo is a won't fix until we find a way to  plug it in the
code base without generating a huge code base increase or a dependancy 
on such a huge code base.                                           

Daniel
Comment 4 Simon Woodward 2004-07-06 16:20:46 UTC
I've hit this problem as well.  I have a large list of items in XML that I'm
generating HTML for and the sort order comes out all wrong.  All of the items
with lower case starting letters end up at the end of the list.  It means that I
can't use xsltproc, which is an enormous pity.
Comment 5 Simon Woodward 2004-07-06 16:23:25 UTC
Created attachment 29288 [details]
Test data

This is a very simple test case.  Unless this data can be sorted properly
xsltproc cannot be said to comply with the XSLT standard.
Comment 6 Daniel Veillard 2004-07-06 20:23:45 UTC
It should be clear at this point that what is needed is not a test case
but a reasonably sized implementation of said feature, and so far there
is no solution in sight. You can use the ICU library if you want
I do not want to make xsltproc depend on it !

Daniel