Hey thanks Omar, Fabrice and Martin.
- ?chop=false works.
- xml:space='preserve' works
In general:
when the wiki states here: "Many XML documents include whitespaces that have been added to improve readability.
", this should not apply to mixed content fragments as described. Only to start and end of "text content of elements", not on text nodes.
I therefore also think that the second approach is not exactly in line with the intention of the XML standard.
Also I do not want this attribute set here in the database.
The first solution therefore works as the best way to circumvent this BaseX Parser behavior (i.m.h.o.).
Anyways, you saved my day.
Arjan