Hi,
I’m testing BaseX and I have a very short question about XQuery Update Facility. If I try in other XQuery processor like Saxon a simple query that add a ‘id’ in XML, like this:
xquery version "1.0"; declare default element namespace "http://www.w3.org/1999/xhtml";
let $sourcedoc := fn:doc("MOST.xhtml") return for $ancora at $gatto in $sourcedoc//*[@class="testo"]
return if (not($ancora/@id)) then insert node attribute id {concat("testo",$gatto)} into $ancora else()
Saxon run the Query and change the original file, “MOST.xhtml”. If I try the same query in XBase on Ubuntu, I see in the log XBase find the tag to add the id, but the original file is not changed. What I’m missing?
Thank you
Fabrizio