Formatting of xml file.

Oxygen general issues.
anmol
Posts: 11
Joined: Tue Jan 14, 2014 6:29 pm

Formatting of xml file.

Post by anmol »

Hi,

i am using oxygen xml editor for Docbook. So, i have this xml with really bad formatting.
So, i used the format present in the oxygen in the Preferences tab. But i still can't get few things right.
For example:
<para>..... </para> <table>
<colspec /> <tgroup>
.
.
.
</table>

Now i want the table to automatically come to the new line on opening it in the oxygen. But isn't happening.

Regards,
Anmol
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Formatting of xml file.

Post by adrian »

Hi,

To format the XML document you can either (choose the one appropriate for your use case):

- (Text mode) Manually invoke Document > Source > Format and Indent (also available in the toolbar). The XML document must be well formed for this to work

- (Author mode) In Options > Preferences, Editor > Edit modes > Author, subsection Format and Indent, set the radio button to The entire document and if you want it to be consistent with the Text mode formatting also enable the option Apply also 'Format and Indent' action as in 'Text' edit mode. The document gets formatted when you save it in Author mode.

- (All modes) Options > Preferences, Editor > Format, Format and indent the document on open. When this is enabled, the document always gets formatted at opening time. Note that this means that all XML documents are always formatted, so they will always be marked as modified (due to the formatting) after being opened.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
anmol
Posts: 11
Joined: Tue Jan 14, 2014 6:29 pm

Re: Formatting of xml file.

Post by anmol »

Hi adrian,

I tried the last method, which formats the documents on opening.
But still the issue that i am facing is not getting fixed.
suppose i have text like this-
<chapter> .... </chapter> <title> .. </title>
<para> ... </para> <section> ..
.
.
</section>

Now i want that on formatting <title> moves to the new line.
and <section> also moves to next line. I didn't see this result on formatting it.
adrian
Posts: 2879
Joined: Tue May 17, 2005 4:01 pm

Re: Formatting of xml file.

Post by adrian »

Hi,

I've tested with your XML snippets, but it formats them for me. It may depend on the larger context.
Could you please send us a full sample file to support AT oxygenxml DOT com?

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