[xquery-talk] Collections - family relationships

Michael Kay mike at saxonica.com
Sun Jan 5 13:48:27 PST 2014


On 5 Jan 2014, at 21:24, David Lee <dlee at calldei.com> wrote:

> Arg ... so your saying index-of causes a string atomization ?
> Ug.  I know it wants item*  and uses "eq" as the comparison but didn't realize that would stringify documents ... 

Actually the function signature for index-of expects xs:anyAtomicType, which means that if you supply a node it is atomized during the function call.
> 
> 
> Do you know of a sequence function that uses document or node ID's ? 
> 

union, intersect, difference....

The function index-of-node() is given as an example of a function you can write yourself:

http://www.w3.org/TR/xpath-functions-30/#index-of-node

Generally the functions in this appendix were considered for inclusion in the spec, and rejected because they can easily be implemented as user-defined functions.

Michael Kay
Saxonica


More information about the talk mailing list