> > 2) for $p in fn:doc("test.xml")//a > > do replace {$p} > > with element "new-node" {$p/*} > > Hmm I'll leave that one for a WG member to answer.., I think that you > should get get an error from > http://www.w3.org/TR/xqupdate/#id-extensions-to-existing > > All the pending update lists generated by the previous step are merged > by successive invocations of the upd:mergeUpdates operation. If the > upd:mergeUpdates operation signals an incompatibility, a dynamic error > is raised [err:TBD]. > > But I don't actually see that in the table in > http://www.w3.org/TR/xqupdate/#id-compatibility > which has side condition "Not compatible if t1 is t2." in some cases > looks to me as if it should be t1 is an ancestor to t2 Well, the constructor "element new-node {$p/*}" copies the contents of the node $p, so the outermost <a/> node is replaced with <new-node><b><a/></b></new-node>. There is also a rename operation for exactly this (changing a node name without changing it's identity). MartinReceived on Monday, 30 January 2006 15:33:40 UTC
This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:43:44 UTC