Hi,
I have a feature request.
I have a nice file with just the correct indent, that I was able to create by adding the xml:space="preserve" attribute to the root before making my inserts. [From previous thread]
Ex. <block xml:space="preserve">
<block>This is a <b><i>test</i></b> sentence.</block>
</block>
Note: I can't use the output indent = no declaration at the top of my query because I'm in a library module, and I need this function to stay there for sharing.
Now, I can't save the content like this (with @xml:space). My DTD doesn't allow for xml:space="preserve", and I don't want it to. Authors can't get the correct indent (based on our DTD) in the editor as long as the xml:space="preserve" remains.
If I apply:
let $clean-file := copy $copy := $new
modify (delete node $copy/*/@xml:space)
return $copy
file:write('file.xml', $clean-file, $param), where param contains indent="no". It saves correctly, indicating that removing the @xml:space did not cause a the insertion of an indent space between <b> and <i>.
However, the db:replace('db', 'path', $clean-file) function forces an indent on the content between the <b> and the <i>. Since this is a BaseX function, and not an XQuery fonction, I'm hoping we could get db:replace('db', 'path', $clean-file, $param), where param can include output params such as indent=no.
Thank you!