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

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


Subject: Re: AW: [xsl] Sorting Upper-Case first. Microsoft bug?
From: Mukul Gandhi <mukulw3@xxxxxxxxx>
Date: Tue, 5 Aug 2003 10:30:28 -0700 (PDT)

Hi Markus ,
  The spec says that sorting should be done
lexicographically. As you correctly said, if we sort
Ac and ab lexicographically, ab would appear before Ac
even for upper-first sorting. The MSXML and Xalan are
doing just this.

  *But when i sort A2 and a1, a1 appears before A2 for
upper-first sorting. But when i sort A1 and a2, A1
appears before a2 for upper-first sorting*. This
happens both for MSXML and Xalan. Does this not mean,
that after the first character(a/A) the integer is
making difference to sorting..? This may be a
processor specific behaviour..

i am now coming to believe that strings having numbers
also have some lexicographic meaning.. Either XSLT
processors(MSXML, Xalan etc.) are respecting this
inherent lexicographic meaning or they are
implementing algorithms like TR10 as M. Kay pointed. 

*It would be interesting to know how Saxon implements
this behaviour..* if M. Kay will be kind to answer..


Regards,
Mukul


> I'm absolutely sure that MSXML and Xalan don't try
> to find integers
> in text strings (unless told to do so).
> 
> You may try sorting Ac and ab to make this topic
> clear.
> There are no integers in these, but the sorting will
> be ab before Ac,
> even with upper-first sorting.
> 
> The sorting is done *lexicographically*, not binary
> or numerically.
> In a dictionary I would expect xPath, XPath, and
> Xpath
> always sorted before XSLT, xslt and Xslt.
> 
> 
> Regards,
> Markus
> 
> __________________________
> Markus Abt
> Comet Computer GmbH
> http://www.comet.de
> 
> 
> 
> ----------
> Von: 	Mukul Gandhi
> Gesendet: 	Dienstag, 5. August 2003 16:44
> An: 	xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Betreff: 	Re: [xsl] Sorting Upper-Case first.
> Microsoft bug?
> 
> 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..
> 
> [...]
> 
>  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
Keywords