XML Editor - Format inserting leading space before content

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Yuribashi
Posts: 5
Joined: Wed Feb 15, 2017 7:23 pm

XML Editor - Format inserting leading space before content

Post by Yuribashi »

Using <oXygen/> XML Editor 18.1, build 2016102619 (text mode)

Problem: "Format and Indent the document on open" is inserting a leading space before much of the content, and I'd rather it didn't.

How might this be 'switched off' via "Options/Preferences" setting(s)?

Cheers,
Yuribashi
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: XML Editor - Format inserting leading space before content

Post by Radu »

Hi Yuribashi,

Could you give us a small example with how the XML element looks like before and after the formatting Oxygen performs?
And also tell us how you would like it to look like.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Yuribashi
Posts: 5
Joined: Wed Feb 15, 2017 7:23 pm

Re: XML Editor - Format inserting leading space before content

Post by Yuribashi »

Here is a sample element from a file before I open it using Oxygen Editor:

<p id="LEGACY_x88231FB41F86" data-type="subtitle">
Nonconformities
</p>

Here is how it is formatted in Oxygen Editor:

<p id="LEGACY_x88231FB41F86" data-type="subtitle"> Nonconformities </p>

I'd rather not have the spaces wrapping the content.
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: XML Editor - Format inserting leading space before content

Post by Radu »

Hi,

Oxygen never completely removes white spaces, at best it collapses them as one white space but it does not remove them as it might affect the original content interpretation.
For example if you have this piece of HTML document <b>word1 </b><b>word2</b>, the web browser renders it as "word1 word2". If you format and indent the content in Oxygen and Oxygen would remove that trailing space, you would get <b>word1</b><b>word2</b> which in a web browser would be rendered as "word1word2".
So we do not have a setting for what you want.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply