Page 1 of 1

How to switch off inserting line breaks within tags

Posted: Thu Sep 13, 2018 5:57 pm
by Seb
How can I disable Oxygen inserting line breaks within XML tags like this:

Code: Select all

...<hi
rendition="#u"
>

Re: How to switch off inserting line breaks within tags

Posted: Fri Sep 14, 2018 12:15 pm
by Radu
Hi,

I'm sorry but we do not have a special option for this. In the Oxygen Preferences->"Editor / Format / XML" page there is a "Preserve Space" list, maybe you could add to it hi[@rendition="#u"].

Regards,
Radu

Re: How to switch off inserting line breaks within tags

Posted: Fri Sep 14, 2018 12:26 pm
by Seb
I then would like to request this feature.

We apply transformations to the XML files after they have been edited with Oxygen. After the transformation, the line breaks within tags disappear, because they are obviously not representable in a DOM. A (Git) diff of the file before and after the transformation becomes very muddy and impractical then.

Re: How to switch off inserting line breaks within tags

Posted: Fri Sep 14, 2018 3:38 pm
by Radu
Hi,

I added an issue for this. But we cannot guarantee that Oxygen's format and indent will be precisely the same as the XSLT processor's serialization.
Maybe before comparing the two files you can pass the current XML document through an XSLT copy stylesheet just to serialize them both in the same way before the comparison.

Regards,
Radu