- From: Michael Kay <mhk@mhk.me.uk>
- Date: Tue, 17 Feb 2004 15:05:30 -0000
- To: <public-qt-comments@w3.org>
- Message-ID: <001401c3f567$7c271ac0$6401a8c0@pcukmka>
I personally think that "order by" is one of those things that should never fail. If two items have non-comparable types, then their relative ordering in the result should be implementation-dependent, and no error should be raised. XML deals with semi-structured data, and it's common to find elements that allow, for example, the union of an xs:integer or the string "N/A". I don't see why we should make it impossible to sort on such fields. Having said that, the proposed change is an improvement. Michael Kay -----Original Message----- From: public-qt-comments-request@w3.org [mailto:public-qt-comments-request@w3.org] On Behalf Of Don Chamberlin Sent: 17 February 2004 04:45 To: public-qt-comments@w3.org Subject: [XQuery] IBM-XQ-025: Comparable types in Order By clause (IBM-XQ-025) Section 3.9.3, Order By and Return Clauses: The first bulleted list says that each orderspec in an Order By clause must "return values of the same type for all tuples." We should use a different term: "comparable types" rather than "same type", and we should define the term. For the purposes of this rule, all numeric types should be "comparable". The types xs:string and xdt:untypedAtomic should be "comparable". Any atomic type should be "comparable" with its derived types, and two atomic types that are derived from the same base type (or that are both derived from numeric types) should be "comparable". --Don Chamberlin
Received on Tuesday, 17 February 2004 10:04:48 UTC