indentation

Having trouble installing Oxygen? Got a bug to report? Post it all here.
eHannes
Posts: 31
Joined: Sat Apr 16, 2005 11:29 am

indentation

Post by eHannes »

Hi,

Sometimes, indentation isn't working as I expected. The elements aren't indented but they all start in the first column. Other files go ok.
I'm probably missing something here, but what?

Regards,
Hans Scholte
Costin
Posts: 833
Joined: Mon Dec 05, 2011 6:04 pm

Re: indentation

Post by Costin »

Hello,

This could occur for the respective file in case you already have indents in the XML document.
In this case, Oxygen will detect them and use the detected indent when formatting.
The thing is Oxygen detects this indent size from the document ( which is zero in this case), and when you perform the format and indent operation, it formats the file preserving this indent size (zero indent).
If you don't want that, you can force it to use a specific indent when formatting in Options > Preferences, Editor / Format. Disable "Detect indent on open" and set "Indent size" to the value that you want (4 is the default value). Then, reopen the file and perform the format and indent operation.

After completing these steps and your document is indented as you wish, I recommended enabling the option back, so that Oxygen detects the current indent settings of each document. Of course, if you want to force a fixed indent size for all your documents, you can leave this option ("Detect indent on open") disabled.

Let me know if this solves the issue or if you need further assistance.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
eHannes
Posts: 31
Joined: Sat Apr 16, 2005 11:29 am

Re: indentation

Post by eHannes »

Thanks! That was is what i missed!
Post Reply