I've got problems to update several documents using a XQuery Update.
The oxygen version is 16. I use Saxon-EE XQuery 9.5.1.5. as a transformer and disabled XQuery 3.0 support.
Here is an example:
Code: Select all
xquery version "1.0";
let $docs := collection("file:///C:/My_Collection/?select=*.xml")
for $doc in $docs
return
replace value of node $doc/rootElement/element with 'new value'
Updated document discarded because it was not read using doc(). Warning
If I try
Code: Select all
replace value of node doc($doc)/rootElement/element with 'new value'
It works if I modify the script and update only one file
Code: Select all
let $doc := doc("file:///C:/My_Collection/File.xml")
return
replace value of node $doc/rootElement/element with 'new value'
to update multiple files?
Thanks,
Franziska