RE: XQuery 1.0 - 2.2 "Collection"

> The description in 2.2 of the xf:collection function is 
> confusing, to me at 
> least.
> 
> A collection is said to be any sequence of nodes but a 
> sequence is defined 
> elsewhere as a collection of both nodes and atomic values. 
> So, by that latter 
> definition it isn't that kind of sequence at all.

Clearly, a sequence that contains nodes only is a special case of a sequence
that can contain both nodes and atomic values. So yes, it is that kind of
sequence.

> 
> Also it doesn't seem helpful to define a collection by using 
> a term which is itself defined in terms of an (ordered) collection.

Well, we're not actually defining the term "collection" here, only the
behavior of a function named "collection".
> 
> A similar lack of clarity/consistency seems to afflict 14.5.4 
> in Functions and Operators.
> 
There's a narrow line between abstraction and lack of clarity. The
definition of the collection function is deliberately abstract, in that the
concept of a collection identified by a URI may have many different concrete
realizations in different implementations. In some implementations it might
be something like a WebDAV collection, or a region of a database; in others
it might be a directory or folder in filestore, or the set of documents
listed in some XML index document. We don't want to rule any of these things
out.

Michael Kay

Received on Friday, 25 October 2002 12:59:21 UTC