Hi Rob, I didn't find variable $c in your example, but the following modification might give you the correct result: let $update.processor := function($a, $b) { ($a update replace value of node ./default/text1 with ()) update insert node $b/string into .//default/text1 } ...or (depending on what you plan to do): let $update.processor := function($a, $b) { ($a update insert node $b/string into default/text1) } As you already observed, it is only possible to update nodes that have been copied by the 'update' keyword. Hope this helps, Christian On Fri, Aug 8, 2014 at 3:49 PM, Rob Stapper <r.stapper@lijbrandt.nl> wrote:
Hi,
Can anyone help me with this casus?
I want to update XML-source: $a, by inserting the content of XML-element: $b, a sub-element of $a, into XML-element: $c, also a sub-element of $a.
The relative path from $b to $c is known.
See attached example: the problem is that the update works on a copy of $a and that the destination-element: $b/parent::*/default/text1, is actually an element of the original $a.
How can I make it point to the corresponding element in the copy?
Any suggestions?
Thanx in advance,
Rob Stapper
------------------------------ <http://www.avast.com/>
Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus <http://www.avast.com/> actief is.