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

Re: Sorting Upper-Case first. Microsoft bug?

Subject: Re: Sorting Upper-Case first. Microsoft bug?
From: Mukul Gandhi <mukulw3@xxxxxxxxx>
Date: Tue, 5 Aug 2003 07:44:26 -0700 (PDT)
xsl sort case insensitive
Hi David,
  The spec says that "if data-type is text, the sort
keys should be sorted lexicographically". How you are
describing (or, interpreting) it is correct.. 

i have observed that both MSXML and Xalan interpret
this clause in a certain way, when integer(s)
characters exists in strings. When the strings have
*all alphabets* (either small case or upper-case), how
you have described lexicographic sorting is being
implemented by both MSXML and Xalan .. But when
*integer characters* come in the strings, the
behaviour of processors becomes different..

i have observed that A4138 will come after a4136 , if
case-order is upper-first.. But if the strings were
lets say A and a, then A would come before a if
case-order is upper-first..

it therefore makes me believe that processors(atleast
MSXML and Xalan) treat "all alphabetic" strings
differently than string which have alphabets and
numbers mixed..

Please correct me if i am wrong..

Regards,
Mukul


--- David Carlisle <davidc@xxxxxxxxx> wrote:
> 
>   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
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

 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.