[Bug 13747] [XPath 3.0] Determinism of expressions returning constructed nodes

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13747

--- Comment #7 from Jonathan Robie <jonathan.robie@gmail.com> 2011-08-12 16:37:41 UTC ---
(In reply to comment #5)
> Thanks. So the requirement here, if I have reverse-engineered it correctly, is
> to generate unique ID attributes on nodes in the result tree, and this is being
> achieved by (a) relying on the uniqueness of constructed nodes, and (b) calling
> generate-id() on those constructed nodes. In this particular example the IDs do
> not appear to be referenced from anywhere, but in another example I guess they
> could be.

A node constructor creates a new node. If you create two nodes, and update one
of them, that doesn't affect the other one. The uniqueness of nodes matters in
XQuery.

Clearly, it's easier to optimize if you don't need to ensure unique nodes. If a
processor is able to determine that the identity of nodes doesn't affect the
result, it can perform optimizations that discard this identity. But I do think
the uniqueness of newly constructed nodes.

I think XQuery is clear that constructors create new nodes, e.g. 

> An element constructor creates an element node.

And in our data model, it's clear that nodes have identity:

> Each node has a unique identity.

Comparisons like "is", "<<", ">>" are affected by this identity.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Friday, 12 August 2011 16:37:45 UTC