HURRA! -wi fixes the problem! Thank you very much, Christian, and Dirk, too.
I had not understood that I must use -w in combination with i - what I had tried was -i ... -w .
Now I know how I can always avoid the problem (which tends to be necessary when dealing with mixed content, where of course embedded markup is usually preceded and following by whitespace.)
Problem solved, file closed, BaseX top.
Kind regards, Hans-Jürgen
Trailing remark - of course your side answer is true, I had not thought of that: options do not render the code unportable. Thanks for the reminder!
-------------------------------------------- Christian Grün christian.gruen@gmail.com schrieb am Do, 20.3.2014:
Betreff: Re: [basex-talk] Bug (?) - trailing whitespace in text nodes An: "Hans-Juergen Rennau" hrennau@yahoo.de CC: "basex-talk@mailman.uni-konstanz.de" basex-talk@mailman.uni-konstanz.de, "Dirk Kirsten" dk@basex.org Datum: Donnerstag, 20. März, 2014 22:38 Uhr
Hi Hans-Jürgen,
"Chops all leading
and trailing whitespaces from text nodes while building a database, and discards empty text nodes. By default, this option is set to true, as it often reduces the database size by up to 50%. It can also be turned off on command line via -w."
The text
states clearly that chopping affects only text nodes stored into a database.
Just another indication that we continuously need to improve our documentation (we are looking for volunteers!). The chop option (which is one of the features that we introduced at a very early stage, but are hard to get out again) also applies to the -i flag which I assume you used to specify the input. When using -w...
basex -wi input.xml .
<para>xxx <emphasis role="italic">abc</emphasis> yyy.</para>
...I get the correct result.
(Side remark: it would be a serious issue if the prolog option were required, as this would imply that standard conformant behaviour could only be achieved by making the code unportable.)
Side answer: The situation is not ideal, but BaseX-specific prolog options won't at least cause any compatbility issues, because the option declaration will simply be ignored by other processors.
How did you proceed? Christian