I'm trying to do an update operation on a file using standalone cmdline basex.

The xml-declaration get printed to stdout instead of to the updated file.

$cat test.xml
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <test/>
</root>

$cat test.xq
declare option output:omit-xml-declaration "no";

let $root := doc("test.xml")/root
return insert node <test/> into $root

$basex -u test.xq

$cat test.xml
<root>
  <test/>
  <test/>
</root>
 
The declaration gets removed :<