My question is : in what purpose this condition is imposed ? and how can i insert new node under different nodes ?.To process a set of nodes in XQuery, the general approach is to use a sequence iterator (a for expression).
will return :
copy $d := <root><item/><item/></root> modify ( for $i in $d/item return insert node <test/> into $i ) return $d
<root> <item> <test/> </item> <item> <test/> </item> </root>
I would be very grateful if you help me to know the goal of this condition+ because it is not imposed in other languages like XUpdate*.Short answer : because that's what the specification says... :)