- assigned_to: nobody --> gnschmidt
I use the XML Topic Map format a lot, and it's pretty verbose, with a number of elements that simply wrap other elements.
Here's a typical fragment
<topic id="my-example">
<instanceOf>
<topicRef xlink:href="#example" />
</instanceOf>
<baseName>
<baseNameString>My example</baseNameString>
</baseName>
</topic>
When I create these files, both by hand and programmatically, I always format them so that any element that has a single child that is one line long puts that child on the same line as that element.
In other words,
<instanceOf><topicRef xlink:href="#example" /></instanceOf>
and
<baseName><baseNameString>My example</baseNameString></baseName>
(Well, they appear on a single line if the line isa typical length of 70 characters or more.)
For my ideal pretty-printing, I would be able to specify either a global rule like this, or be able to specify certain elements or certain element/child combinations for which an element wouldn't automatically be put on a new line and indented further.
Obviously, pretty printing is intended to make the XML easier to scan and the structure easier to recognize. Because of XTM's verbosity, this "tighten up" option is really necessary to improve its readability.
Thanks,
Roger Sperberg