Jan Bares wrote: > one more question regarding Save options. How does XXE control the open > lines and indentation? Which elements are considered to start on new line? > For example I have a XHTML document with nested <div>. The highest <div> is > indented, but the inner <div> are not indented. Why?
The highest div is contained in an element-only element (such as blockquote or body with the strict DTD). Element-only elements are saved using a ``vertical layout'': <blockquote> <div>...</div> <p>...</p> </blockquote> div, like p, may contain a mix of text and child elements. Mixed elements are saved using an ``horizontal layout''. <div>some text with a: <p>word word word.</p>More text and a child <div>word word word</div></div> Why all this? Because: [1] XXE being a generic XML editor, it does not know what is a div, a p or a blockquote. It does not know what is XHTML. It does not know that XHTML files are consumed by Web browsers which intelligently discards ignoreable whitespace. [2] XXE will never add whitespace in places where the grammar (DTD, W3C XML Schema, RELAX NG schema) says that characters are meaningful. Therefore it can add indentation whitespace inside a <blockquote>, but not inside a <p> or a <div>. --- PS: XXE has not been designed to indent XML files. It has been designed to create structured content which conforms to the XML data model. Please, use a third party XML indenter if you are not happy with the way XXE indent your files. Please, do not request features related to the way XXE saves XML files.

