W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2004

ORA-FO-288-C: Are xdt:untypedAtomic values distinct or not distinct?

From: Stephen Buxton <Stephen.Buxton@oracle.com>
Date: 17 Feb 04 11:05:58
Message-Id: <200402171905.i1HJ5wb28130@rgmgw4.us.oracle.com>
To: public-qt-comments@w3.org

SECTION 15.1.9 : fn:distinct-values

The first paragraph says "Values that cannot be compared, i.e. the
eq operator is not defined for their types, are considered to be
distinct."  Later it says "Values of type xdt:untypedAtomic are
compared as if they were of type xs:string."  It is not clear
whether one should use the implicit cast from xdt:untypedAtomic
to xs:string before or after applying the rule that values of
incomparable types are always distinct.  Example: given an
untypedAtomic of value "abc" and an xs:string of value "abc",
if we first apply the rule that incomparable values are distinct,
then we conclude that these are two distinct values.  On the
other hand, if we cast the xdt:untypedAtomic, making it into
an xs:string before comparing, then the two values are equal
and only one of them is retained in the result.

If the second interpretation is the correct one, then what is the
type of the "abc" value that is retained in the result?  Is it
xdt:untypedAtomic, is it xs:string, or is it

The simplest resolution to this might be to say that the first
step is to form a sequence derived from the input sequence by
replacing every xdt:untypedAtomic by the result of casting it to
xs:string.  Then throw out duplicates from this derived sequence.

- Steve B.
Received on Tuesday, 17 February 2004 14:06:15 UTC

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