The removal of line breaks is simply caused by
which can be easily spotted in the patch and removed if required.
I adopted this behavior from Henning's patch which I considered useful as some kind of white-space normalization since one (at least me and my IDE) usually uses white-space in XML only for formatting of the XML input itself, and not for formatting of the output generated from the XML. Or is there any spec about the changes.xml that dictates to preserve white-space in certain elements?
If white-space normalization is OK, then however my patch should be further improved to deliver a proper normalization. I would define a proper normalization as
- no leading/trailing white-space (trim() in place)
- no consecutive white-space (missing)
- only 0x20 as white-space character (missing)
The last two aspects should be easily realizable via
instead of the existing replace() calls.