XML Editor - Format inserting leading space before content

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
Yuribashi
Posts: 5

XML Editor - Format inserting leading space before content

Fri Jun 16, 2017 7:21 pm

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: 5510

Re: XML Editor - Format inserting leading space before content

Mon Jun 19, 2017 9:00 am

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

Re: XML Editor - Format inserting leading space before content

Tue Jun 20, 2017 3:57 pm

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: 5510

Re: XML Editor - Format inserting leading space before content

Tue Jun 20, 2017 4:25 pm

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

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 0 guests