xsl-list
[Top] [All Lists]

RE: Is this a sorting bug in xalan 6.4.0?

2003-02-07 06:41:19
I am sure there are lots of people here who can trump my 
experience handily, but is my expectation that spaces will be 
significant in string sorting, at least by default, really 
*that* parochial?

We all have parochial assumptions about how strings should be sorted,
and they are all different. So the trend is for modern software systems
to provide localisation support.

Most of the programming languages you referred to probably use
"codepoint" collation, where strings are sorted according to their
numeric character codes. It looks as if Xalan is trying to do a more
intelligent sort. Looking in my dictionary, I find that "ad hoc" appears
between "adhibit" and "adiabatic": so you can't simply say that it's
wrong to ignore spaces, it's clearly what some users want.

XSLT 2.0 (and Saxon 7.3) give you extensive control over the collation,
recognizing that there is no one answer that suits everybody.

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list