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

Re: Recursive replacement

From: David Carlisle <davidc@nag.co.uk>
Date: Mon, 30 Jan 2006 16:07:32 GMT
Message-Id: <200601301607.QAA23345@penguin.nag.co.uk>
To: novak@ispras.ru
CC: martin@x-hive.com, www-ql@w3.org

> Thus they preserve their identity (am I right?).

I don't think so, The semantics of  "element new-node {$p/*}" 
(in Xquery, without the update extensions) are that the expression
inside the {} is evaluated to get a sequence, and then that sequence is
_copied_ to form child nodes of the newly created element node.
So the <a/> that's below the <newnode> has a new identity.


   The content expression of a computed element constructor (if present) is
   processed in exactly the same way as an enclosed expression in the
   content of a direct element constructor, 

and that says


   The result of an element constructor is a new element node, with its
   own node identity. All the attribute and descendant nodes of the new
   element node are also new nodes with their own identities, even if they
   are copies of existing nodes. 


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
Received on Monday, 30 January 2006 16:08:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:43:44 UTC