Use of fn:distinct-values

"Probst, Martin" <[email protected]> Wed, 9 Feb 2005 17:22:18 +0100
Newsgroups gmane.comp.web.query-languages
Message-ID <[email protected]>
Hi,
there seems to be somthing wrong with several usecases:
fn:distinct-values is used on node sequences like in R/Q13:
> "distinct-values(doc("bids.xml")//userid)"

Though the spec (XQ Function and Operators and Formal Semantics) says:
> fn:distinct-values($arg as xdt:anyAtomicType*) as xdt:anyAtomicType*

What is the desired behaviour? Should fn:distinct-values operate on
xqdm:Items (and by that on nodes)? Should it apply atomization on it's
input? Or should it (as in the spec by now, though not explicitly) throw
a typing error?

Regards,
Martin Probst