- From: Kay, Michael <Michael.Kay@softwareag.com>
- Date: Mon, 4 Aug 2003 14:53:13 +0200
- To: Ashok Malhotra <ashokma@microsoft.com>, Stephen Buxton <stephen.buxton@oracle.com>, public-qt-comments@w3.org
- Message-ID: <DFF2AC9E3583D511A21F0008C7E62106073DD01A@daemsg02.software-ag.de>
For the analogous operation xsl:for-each-group in XSLT, we made a different decision: we decided that non-comparable items should be treated as distinct (i.e. not equal). One reason for this was implementation experience: in an implementation that uses hashing, it's extra effort to detect the fact that that there are non-comparable items in the sequence, rather than simply sorting non-comparable items into different hash buckets. A more important reason is that it involves less surprise for the user. For example, if @price is defined with a union type that allows decimal numbers or the string "unknown", the user would not expect distinct-values(//@price) to give an error just because the population includes a mixture of strings and numbers. Michael Kay -----Original Message----- From: Ashok Malhotra [mailto:ashokma@microsoft.com] Sent: 24 July 2003 16:24 To: Stephen Buxton; public-qt-comments@w3.org Subject: RE: ORA-FO-ERRORS 15.1.11 fn:distinct-values Added error message to cover this case. Thanks! All the best, Ashok _____ From: public-qt-comments-request@w3.org [mailto:public-qt-comments-request@w3.org] On Behalf Of Stephen Buxton Sent: Monday, June 30, 2003 7:29 AM To: public-qt-comments@w3.org Subject: ORA-FO-ERRORS 15.1.11 fn:distinct-values Functions and Operators, Section 15.1.11 fn:distinct-values <fn:distinct-values> says "All the values must be of a single type or ...". Then "The type must have a total order. If this condition is not satisfied, an error is raised" What will happen if all the values are not of a single type - will an error be raised ?
Received on Monday, 4 August 2003 09:21:40 UTC