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

RE: xsl:sort/@case-order feature missed

Subject: RE: xsl:sort/@case-order feature missed
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Thu, 31 Jan 2002 15:53:33 -0000
xsl sort case

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Jonathan
> Perret
> Sent: 31 January 2002 14:41
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  xsl:sort/@case-order feature missed
> I only have the first edition of the XSLT programmer's reference,
> so maybe this has changed, but mine says for the meaning
> of case-order :
> "Defines whether upper-case letters are to be collated before
> or after lower-case letters. The default is language-dependant."

This is almost exactly the language used in the spec itself. I don't think
it means that the default must be equivalent to one of the values
upper-first or lower-first.
> The language that is referred to here can only be the one that
> is specified by xsl:sort's lang attribute, given that it seems
> hard to define what happens when sorting elements that
> bear different xml:lang attributes.

Yes: the lang attribute, or the default language used in its absence. But
since the statement that "the default is language-dependant" is essentially
untestable, I interpret it to mean that in the absence of the case-order
attribute, the implementor can do what he likes.
> So if you don't specify case-order, you should get either the
> upper-first or the lower-first behavior, depending on the
> lang attribute. I think that's what "case-order effective value"
> means. There does not seem to be a way to sort in
> document-order strings that only differ in case.
> >
> If there was an uppercase() function (is there one in XSLT 2 ?)
> this would get you the desired order :
> <xsl:sort select="uppercase(...)" />
XSLT 2.0 provides the ability to invoke a named collating sequence when
sorting. It's up to the implementor to provide mechanisms for defining named
collating sequences. Saxon 7.0 does it by exposing the Java collation

And there are functions to convert to upper or lower case as well.

Mike Kay

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.