Failure to Indent and Format Properly

Oxygen general issues.
Melissa
Posts: 1
Joined: Wed May 16, 2012 9:51 pm

Failure to Indent and Format Properly

Post by Melissa »

I recently went from version 10 to version 12 and I'm having difficulty formatting correctly.

If I hit the format button in .xml docs, it works fine. However, when I use this same feature in .html docs, it fail to format everything. It stops formatting after my first div. These same docs worked fine in version 10 but not 12.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Failure to Indent and Format Properly

Post by adrian »

Hello,

Starting with version 12 Oxygen introduced a fixed formatting profile for HTML. e.g. a space is automatically added before the slash in empty elements: <br />

Note that this profile should not affect the formatter functionality.
If possible, please send us a sample HTML file where the Oxygen Format and Indent fails to work as expected. You can send it via email to: support AT oxygenxml DOT com

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Failure to Indent and Format Properly

Post by adrian »

Hi,

In case anyone else wonders about this, I've compared the formatting in v10 with the one in v12. The formatting in v10 was generic (not aware of the schema or the specific type of XML document) and was considered intrusive because it inserted indents between tags that previously did not have any space and this could result into a significant change for the XML. This behavior was changed in v12 with the introduction of the schema aware format and indent.

If you'd rather use the old type of XML formatting from version 10, you can disable the option "Schema aware format and indent" from Options > Preferences, Editor > Format > XML. This will affect all types of XML files, not just HTML.
The file(s) should be reopened for the new settings to become active.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply