F&O comments on distinct-values function

A few comments on the distinct-values function:

1. Why does it matter if two values of the same type have a total order,
as long as they can be compared using eq?  For example, QNames do not
have total order but you should be able to pick out distinct ones using
the eq/ne operators.  It seems like only duration would be a problem
here.

2. I'm assuming that xs:integer(1) and xs:decimal(1.0) are not distinct
values (or are they?) Should the rec specify which type the returned
value should have?  If not, maybe there should be a note about that
being implementation dependent. 

3. How should anySimpleType values be handled?  Using the eq operator
results in an anySimpleType value being cast to the type of the other
operand.  It seems logical that if the sequence is (xs:integer("3"),
<x>3</x>), distinct-values should only return one value (3), but what if
it is (xs:integer("3"), <x>3.0</x>, <x>3</x>).  Should that return one,
two, or three values?  This should be clarified.

4. NaN is not equal to itself using the eq operator, so should it really
be equal to itself for the purposes of this function?

5. There is no need to make a special point about 0.0 being equal to
-0.0, since this is the behavior of the numeric-equal function.

6. In the last sentence of the first paragraph, the comma appears to be
in the wrong place and "a implicit" should say "an implicit"  Also, the
sentence starting with "Equality of string values are..." should be
"Equality of string values is..."

Thanks,
Priscilla

Received on Wednesday, 20 November 2002 11:21:49 UTC