Recursive replacement

Consider the following xml document:
<root><a><b><a/></b></a></root>
and 2 queries:

1)replace {fn:doc("test.xml")//a} with <new-node/>
2) for $p in fn:doc("test.xml")//a
   do replace {$p}
      with element "new-node" {$p/*}

Due to the Compatibility of Update Primitives table it follows that the
deletion of
The upper-most <a> node doesn't contradicts woth the update of the inner
<a>-node.
Could you please explain me, what is the result of these statements (or an
error should be raised)

Best Regards, 
Leonid Novak, 
Sedna DBMS Team,
www.modis.ispras.ru 

Received on Monday, 30 January 2006 14:45:19 UTC