W3C home > Mailing lists > Public > www-ql@w3.org > January to March 2005

RE: Use of fn:distinct-values

From: Michael Kay <mhk@mhk.me.uk>
Date: Wed, 9 Feb 2005 17:05:52 -0000
To: "'Probst, Martin'" <martin.probst@sap.com>, <www-ql@w3.org>
Message-ID: <E1CyvIH-0000PQ-Hi@frink.w3.org>

Atomization is part of the function calling mechanism. If you supply nodes
to a function that expects atomic values, the nodes get atomized.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: www-ql-request@w3.org [mailto:www-ql-request@w3.org] On 
> Behalf Of Probst, Martin
> Sent: 09 February 2005 16:22
> To: www-ql@w3.org
> Subject: Use of fn:distinct-values
> 
> 
> 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
> 
Received on Wednesday, 9 February 2005 17:06:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:17:16 UTC