[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Re: talk Digest, Vol 58, Issue 20

Jim Melton jim.melton at acm.org
Wed Feb 27 09:31:19 PST 2008


  Re: talk Digest
At 2/27/2008 11:38 AM, http://x-query.com/mailman/listinfo/talk wrote:


>Hi all,
>I retrieve UTF-8 encoded Strings from my database with this XQuery:
>
>for $x in //text/country order by xs:string($x) ascending return xs:string($x)
>
>This is the result, it is not ordered like I expected:
>
>Deutschland
>Italia
>Oabcde
>Ägypten
>Österreich
>
>Is this the correct order according to a default collation?

XQuery defines the "default default" collation 
(that is, the default collation in the spec that 
can still be over-ridden by an 
implementation-chosen default collation) to be 
the Unicode Codepoint collation.  The ordering 
you see is exactly correct for the Unicode 
Codepoint collation, because "Ä" has a codepoint 
greater than "O" and "Ö" has a codepoint greater than "Ä".


>How would I order it like this (which would be standard for German language):

Check the documentation for your XQuery 
implementation.  If it offers a German language 
collation, then the documentation will tell you 
the specific URI used to identify that 
collation.  If it does not offer such a 
collation, then I'm afraid the XQuery 
Recommendation doesn't provide a way for you to 
build your own (well, you can do so by writing a 
user-defined external function that implements such a collation).

Hope this helps,
    Jim


>Ägypten
>Deutschland
>Italia
>Oabcde
>Österreich
>
>Thanks a lot, Gonz

========================================================================
Jim Melton --- Editor of ISO/IEC 9075-* (SQL)     Phone: +1.801.942.0144
   Co-Chair, W3C XML Query WG; XQX (etc.) editor    Fax : +1.801.942.3345
Oracle Corporation        Oracle Email: jim dot melton at oracle dot com
1930 Viscounti Drive      Standards email: jim dot melton at acm dot org
Sandy, UT 84093-1063 USA          Personal email: jim at melton dot name
========================================================================
=  Facts are facts.   But any opinions expressed are the opinions      =
=  only of myself and may or may not reflect the opinions of anybody   =
=  else with whom I may or may not have discussed the issues at hand.  =
======================================================================== 




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-2011 All Rights Reserved.