Re: [xsl] Problem sorting alphabetically: all uppercase entries come first.

Subject: Re: [xsl] Problem sorting alphabetically: all uppercase entries come first.
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 16 Dec 2003 15:31:49 GMT
(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 :


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:


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



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:

 XSL-List info and archive:

Current Thread