W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2009

XQuery 1.0 and XPath 2.0 Functions and Operators: http://www.w3.org/2005/xpath-functions/collation/codepoint

From: Patrick Durusau <patrick@durusau.net>
Date: Wed, 02 Sep 2009 10:40:41 -0400
Message-ID: <4A9E83E9.3060400@durusau.net>
To: public-qt-comments@w3.org
Greetings!

I ran across a reference to the "Unicode code point algorithm" (as 
distinguished from the Unicode Collation Algorithm) and worked my way to 
Section 7.3.1 Collations, of XQuery 1.0 and XPath 2.0 Functions and 
Operators.

Where I find:

> Some collations, especially those based on the [Unicode Collation 
> Algorithm] <http://www.w3.org/TR/xpath-functions/#Unicode-Collations> 
> can be "tailored" for various purposes. This document does not discuss 
> such tailoring, nor does it provide a mechanism to perform tailoring. 
> Instead, it assumes that the collation argument to the various 
> functions below is a tailored and named collation. A specific 
> collation with a distinguished name, 
> |http://www.w3.org/2005/xpath-functions/collation/codepoint|, provides 
> the ability to compare strings based on code point values. Every 
> implementation of XQuery/XPath must support the collation based on 
> code point values.
It further states, a couple of paragraphs later:

> The XQuery/XPath static context includes a provision for a default 
> collation that can be used for string comparisons and ordering 
> operations. See the description of the static context in Section 2.1.1 
> Static Context <http://www.w3.org/TR/xpath20/#static_context>^XP . If 
> the default collation is not specified by the user or the system, the 
> default collation is the Unicode code point collation 
> (|http://www.w3.org/2005/xpath-functions/collation/codepoint|).

When I go to XPath 2.0, Section 2.1.1 Static Context, I read:

>    *
>
>       [Definition: *Default collation.* This identifies one of the
>       collations in statically known collations
>       <http://www.w3.org/TR/xpath20/#dt-static-collations> as the
>       collation to be used by functions and operators for comparing
>       and ordering values of type |xs:string| and |xs:anyURI| (and
>       types derived from them) when no explicit collation is specified.]
>
Then in XPath 2.0, D Implementation-Defined Items, I find:

> 2. The statically-known collations 
> <http://www.w3.org/TR/xpath20/#dt-static-collations>.

OK, here's my question/concern:

Is "Unicode code point collation *defined* in the XPath/XQuery/XSLT/etc. 
family of standards or it is simply *named*?
(If it is defined, a hint as to where to find that definition would be 
appreciated.)

I would suspect that defining it would involve at a minimum specifying 
some default Unicode normalization as well as what happens after 
normalization.

As I read the documents today, I suspect that *all* collations are 
implementation define, even 
"|http://www.w3.org/2005/xpath-functions/collation/codepoint|" although 
all implementations are required to support it. Not sure what it means 
to have a named but undefined collation as a requirement for 
implementations.

BTW, editorial nit, "statically-known" only appears with a separating 
hyphen in D. All other occurrences are written without the hyphen, thus 
"statically known...."

Thanks!

Hope everyone is having a great week!

Patrick

PS: If this is the wrong list, please suggest the correct one. This 
seemed to me to be more of a question about the standard per se than 
about XQuery or XPath, although the answer would have an impact on both.

-- 
Patrick Durusau
patrick@durusau.net
Chair, V1 - US TAG to JTC 1/SC 34
Convener, JTC 1/SC 34/WG 3 (Topic Maps)
Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300
Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps)
Received on Wednesday, 2 September 2009 14:41:43 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:40 UTC