A purely visual "Format and Indent" function

Are you missing a feature? Request its implementation here.
yvesforkl
Posts: 15
Joined: Wed May 07, 2008 1:25 pm

A purely visual "Format and Indent" function

Post by yvesforkl »

Resuming what a number of people have expressed at the XML Prague 2015 Oxygen Users' Meetup, in Text Editing Mode, it would be very helpful if "Format and Indent" could render an indented view of the XML document without touching the document's whitespace at all.

Few XML editors are capable of this, one famous example is XMLQuire.

As George Bina suggested, this could maybe achieved by preparing for the Text Editing Mode a special, second CSS stylesheet which basically indents each element based on its depth of nesting (so much for the theory, but I have no idea though how difficult that will get in practice).

The user would then be offered the choice between the default Text Editing Mode view and the indented view.

Implementing this could really be worth the effort. I know of a lot of colleagues of mine and other people that would greatly appreciate an enhanced version of the Format and Indent function for Oxygen's Text Editing Mode which indents the structure in a purely visual way, and does not tamper with the whitespace in the document.

Yves Forkl
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: A purely visual "Format and Indent" function

Post by adrian »

Hello,

Thank you for the feedback.
We have a feature request logged for this ("Visual Format and Indent"). We are considering implementing support for this in the long term. I've added your vote.

The most likely way this will be implemented is in the form of a CSS stylesheet in the Author mode (like George suggested).
For viewing, this is not that big of a problem to implement (via CSS), but there's the editing/saving aspect that also has to work without reformatting the source document which is not as simple. Some additional support is necessary for this to work, especially for source documents that are on a single line.

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