[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Is this a sorting bug in xalan 6.4.0?

Subject: Re: Is this a sorting bug in xalan 6.4.0?
From: Stan Dyck <sgd@xxxxxxxxxxxx>
Date: Thu, 6 Feb 2003 23:47:45 -0800
stan dyck
On Thursday, February 6, 2003, at 09:51 PM, Roger Glover wrote:

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?



This was my thinking as well. There's more though. It appears that in addition to the space character, xalan also ignores "-" as well. I found a bug report on the xalan bugzilla database:


http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13830

Xalan uses the java.text.Collator object (the compare method) to compare strings, probably because it does locale-sensitive string comparisons. So if there is anyone to blame in this case, it is Sun. The xalan developers don't appear to consider it a bug.

Interestingly, the String object's compareTo method sorts strings with spaces and minus signs as I would expect because it does a lexicographic comparison. Presumably, String.compareTo is not necessarily locale-specific, otherwise, why provide a separate object like Collator just for comparing strings. I'm curious at how Saxon does string comparisons for the purpose of implementing xsl:sort.

StanD.


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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.