[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Sorting Upper-Case first. Microsoft bug?


Subject: Re: [xsl] Sorting Upper-Case first. Microsoft bug?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 5 Aug 2003 14:54:29 +0100

  The 3rd row's integer part is different than
  2nd(which makes *WA*4138 after *wA*4136 

I can't see any reason why the later characters should have any
influence on the sorting if the first characters are different.

lexicographic ordering extends an ordering on an alphabet to an ordering
on strings by ordering strings based on the initial segment: to compare
two strings, you take the first position in the string where the
characters differ and then compare that character.

In this case the first character differs, and W comes before w
so the strings should order that way.

Saying that the later characters make a difference is like saying
zb comes before ac in a dictionary because b comes before c
isn't it? In a dictionary order, you'd say z comes after a so zb comes
after ac. Surely it is the same here?

It would be possible to define a collation order that does what is
shown, but I don't think it is sanctioned by XSLT 1, namely to say that
w and W are considered equal a first pass and so if possible you sort
in a case-insensitive way, then only if the entire strings are
considered equal you sort the equivalent strings using uppercase-first.

David


________________________________________________________________________
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
Keywords