How to switch off inserting line breaks within tags

Oxygen general issues.
Seb
Posts: 23
Joined: Mon Feb 20, 2017 8:03 pm

How to switch off inserting line breaks within tags

Post by Seb »

How can I disable Oxygen inserting line breaks within XML tags like this:

Code: Select all

...<hi
rendition="#u"
>
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to switch off inserting line breaks within tags

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Seb
Posts: 23
Joined: Mon Feb 20, 2017 8:03 pm

Re: How to switch off inserting line breaks within tags

Post 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.
Radu
Posts: 9041
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to switch off inserting line breaks within tags

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply