Hi France,good to hear.
> 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]
True; when files are written to disk, they are serialized, and serialization parameters can be applied to affect the way serialization works.
> 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>.
It looks like, but it doesn’t ;) In fact, your document will be stored without spaces, as the following example is supposed to show. If the following query is run on an empty database...
> However, the db:replace('db', 'path', $clean-file) function forces an indent
> on the content between the <b> and the <i>.
db:replace("db", "x.xml", <xml><a> B </a></xml>)
..the resulting databasewill be stored as folows (you canviewthe internal structurewith the "info storage" command):PRE DIS SIZ ATS ID NS KIND CONTENT-----------------------------------------
0 1 4 1 22 0 DOC x.xml
1 1 3 1 23 0 ELEM xml
2 1 2 1 24 0 ELEM a3 1 1 1 25 0 TEXT BAs soon as this document is serialized, however, and if indent is set to "true", the representation may change.If the problems occur with WebDAV and oXygen, it could help to add the "org.basex.serializer" option with the value "indent=no" and, possibly, "chop" with the value "no" in your web.xml file [1].Hope this helps,Christian> _______________________________________________
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!
>
>
> --
> France Baril
> Architecte documentaire / Documentation architect
> france.baril@architextus.com
> (514) 572-0341
>
> BaseX-Talk mailing list
> BaseX-Talk@mailman.uni-konstanz.de
> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
>