Dear BaseX team,

"whitespace chopping" (which happens by default unless command-line option -w is used) does not only remove "whitespace-only" text nodes, but also leading/trainling whitespace in element content, for example:

doc.xml:
<hello>    BaseX is phantastic!   </hello>

basex -i doc.xml .

=>
<hello>BaseX is phantastic!</hello>

While the result is of course true, I regard leading/trailing whitespace in element content as information which has a different "level of significance" than whitespace-only text nodes. In other words: I think it is an important use case that leading/trailing whitespace must be preserved, while the "pretty print whitespace" should be discarded.

Did I overlook a way to get rid of whitespace-only text nodes without touching leading/trailing whitespace in element content?

If not, it would be wonderful if you added a new option doing just that.

With kind regards -
Hans-Jürgen