[xslt] xsl:sort again


Whilst running my tests on libxslt, I came across a test case using the
case-order attribute of xsl:sort.

Noticing in the code that this hasn't been implemented yet, I had a dig back
through the archive and found a couple of interesting posts from Daniel and
Bjorn that gave a good overview of how complicated sorting in Unicode is.
As I only barely understand Unicode and the problems sorting the characters,
I'm quite happy to defer to Daniel and Bjorn and not attempt to implement
this myself.
After digging around a little however, I wonder if I could run a couple of
ideas past you for things that I could do to help?

1) Add a simple version of case-order for English only? This would be fairly
simple to do - everything gets sorted in character order, and the upper case
characters are only A-Z (no accents). I know it wouldn't help people using
different languages (e.g. German), but there isn't much specific support for
other languages at the moment anyway.

2) Link in the ICU library from IBM.
Or at least take all the applicable code out to use a cut down version, in a
similar manner to Trio library - the license appears to allow this.
I could probably find a way to integrate ICU in such a way as libxml can
still work without it (either through having it behave in the way it does
now, or maybe adding in a simple case-order sort as in option 1), again
similar to Trio and iconv.

3) Rely on the principle that doing anything at all isn't worth the hassle
and pretend I didn't notice any issues with sorting :-)


Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

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