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

Re: Problem sorting alphabetically: all uppercase entr

Subject: Re: Problem sorting alphabetically: all uppercase entries come first.
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 16 Dec 2003 15:31:49 GMT
lexicographic sorting
(An off list comment to me quoted Jeff Kenton on this list in a
message that doesn't seem to have got here yet.)

  I'm pretty sure that the XSLT spec requires this kind of sorting 
  (dictionary order).  What processor are you using?


The spec does clearly specify lexicographic sorting but it appeared in a
long thread on this list a few months ago that several implementations
(including at least msxml and saxon if I recall) interpreted
"lexicographic sorting" to mean "as sorted in a dictionary"
which means "sorted in an arbitrary order at the whim of the human
lexicographer compiling the dictionary".

This despite the fact that lexicographic sorting has a well defined
meaning as a method of extending an order on an alphabet to an order on
words in that alphabet.

The issue being what is meant by "uppercase first" in the spec.
I think that the only possible reading of the spec is that it specifies
an ordering on letters:
A B C a b c
which you then extend to words by lexicographic ordering :

Abb
Bat
abb
bat

It appears though, that xslt systems have implemented the ordering more
common in dictionaries where ordering is first done on a case
insensitive way and then upper-case first only used to order words that
are identical apart from case:

Abb
abb
Bat
bat


this is no doubt a useful ordering but it isn't "lexicographic ordering"
by any definition of that term that I know.

David


-- 
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 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.