Hi Arjan,

You can also change the default and disable CHOP in your web.xml file [1].

Similar to Omar, we often use xml:space='preserve' in our own projects to
mark mixed-content areas in the documents. For some reason that I never
managed to fully grasp, though, the XML specification provides two values
'preserve' and 'default' for xml:space, but no explicit 'strip' or 'chop'
option (which would be particularly handy if you disable whitespace
chopping by default).

Best,
Christian

[1] http://docs.basex.org/wiki/Configuration




Arjan Loeffen <arjan.loef...@armatiek.nl> schrieb am Mo., 9. Dez. 2019,
20:28:

> Hey thanks Omar, Fabrice and Martin.
>
>    1. *?chop=false* works.
>    2. *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
>
>
>
> Op ma 9 dec. 2019 om 17:03 schreef Omar Siam <omar.s...@oeaw.ac.at>:
>
>> Hi Fabrice,
>>
>> No but I will stick with xml:space='preserve' where I need it. But
>> thanks for the info.
>>
>> Best regards
>>
>> Omar
>>
>>
>>
>
> --
> *Arjan Loeffen*
> Armatiek BV & Armatiek Solutions BV
> 06-12918997
>

Reply via email to