pretty printing inserts newline before closing tag bracket
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 7
- Joined: Wed Jul 26, 2006 11:24 am
- Location: Zurich/Switzerland
pretty printing inserts newline before closing tag bracket
Pretty-printing inserts a newline character before the closing angle bracket of starting tags of mixed elements, if the first node of the content is a text() node.
Example Structure:
[...]
<para>
<language lang="en">
mixed <e>text</e> with inline formatting
</language>
</para>
[...]
Result after pretty-printing:
<para>
<language lang="en"
>
mixed <e>text</e> with inline formatting
</language>
</para>
If, however, the language element content starts with a inline tag, e.g.
<language lang="de">
<e>inline</e> and some text
</language>
the markup is formatted correctly.
Apreciate any help to get rid of this, as it may confuse inexperienced editors.
Example Structure:
[...]
<para>
<language lang="en">
mixed <e>text</e> with inline formatting
</language>
</para>
[...]
Result after pretty-printing:
<para>
<language lang="en"
>
mixed <e>text</e> with inline formatting
</language>
</para>
If, however, the language element content starts with a inline tag, e.g.
<language lang="de">
<e>inline</e> and some text
</language>
the markup is formatted correctly.
Apreciate any help to get rid of this, as it may confuse inexperienced editors.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
I do not really understand how you get that result from the pretty print operation. The pretty print operation breaks the line between the last attribute and the closing angle bracket only if the line width limit set in Options -> Preferences -> Editor / Format is between the end of the attribute and the closing angle bracket. Also it can happen if the first text node which is child of language does not contain whitespace characters and the end of this text node is after the limit set by the line width option, something like:
But your example is not in this case because there is a space character between mixed and <e> and also between </e> and with. If the language element is added to the preserve space elements in Options -> Preferences -> Editor / Format / XML then the break does not occur before the closing angle bracket. Please specify your pretty print options set in Options -> Preferences -> Editor / Format and Options -> Preferences -> Editor / Format / XML and post the example code indented exactly as in the editor panel (when you edit your post press the Code button twice to insert code tags in the post which keep the indenting of the sample code, for example ).
Regards,
Sorin
I do not really understand how you get that result from the pretty print operation. The pretty print operation breaks the line between the last attribute and the closing angle bracket only if the line width limit set in Options -> Preferences -> Editor / Format is between the end of the attribute and the closing angle bracket. Also it can happen if the first text node which is child of language does not contain whitespace characters and the end of this text node is after the limit set by the line width option, something like:
Code: Select all
<language lang="en">longTextHereWithoutWhitespaceAndAfterTheLineWidthLimit<e>text</e> with inline formatting
</language>
Code: Select all
<language lang="en"> ...
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service