Re: [xslt] xsl:sort again



On Thu, Jun 06, 2002 at 12:05:27PM +0100, Richard Jinks wrote:
> Hi
> 
> 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.
> http://mail.gnome.org/archives/xml/2002-April/msg00104.html
> 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.
> http://oss.software.ibm.com/icu/index.html
> 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 :-)

  Well, there are issues with sorting. That's a recognized fact so 3) don't
apply. 2) is a bit scary but if someone is ready to do the work, check
that Licences are compatibles, that would be a long-term solution (maybe
checking with XSLT-2.0 that things aren't about to change radically might
be a good idea too). 1) is a patch in the worse sense of the term, it
doesn't really solve the problem, just hides it :-\

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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