Using an entity for block of XML destroys my pretty printing layout
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 17
- Joined: Wed May 13, 2015 11:59 pm
Using an entity for block of XML destroys my pretty printing layout
I know you can use an entity to represent both inline text and an entire block of XML tags.
When I use an entity to represent a large block of XML, and the do the CTRL-SHIFT-P to "pretty print" the XML, the entity is treated as an "inline" thing and (even if what comes before it and after it are their own blocks) gets the white space before and after it removed. This makes it very hard to read by burying what could be a very important element in the middle of a line and messing up the formatting of what came before and after as well.
I'd love to know of a way to address this, and if there is not yet one, to encourage the devs to address this somehow.
Thanks much!!!
When I use an entity to represent a large block of XML, and the do the CTRL-SHIFT-P to "pretty print" the XML, the entity is treated as an "inline" thing and (even if what comes before it and after it are their own blocks) gets the white space before and after it removed. This makes it very hard to read by burying what could be a very important element in the middle of a line and messing up the formatting of what came before and after as well.
I'd love to know of a way to address this, and if there is not yet one, to encourage the devs to address this somehow.
Thanks much!!!
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Using an entity for block of XML destroys my pretty printing layout
Hi,
Thanks for the report, I added an internal issue for it: "EXM-46792 - Treat entity reference in element only content as an element".
If we make any progress on this in a future release I will update this forum post.
Regards,
Radu
Thanks for the report, I added an internal issue for it: "EXM-46792 - Treat entity reference in element only content as an element".
If we make any progress on this in a future release I will update this forum post.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 143
- Joined: Tue Mar 25, 2003 11:21 am
Re: Using an entity for block of XML destroys my pretty printing layout
Hello,
Thank you for reporting this issue.
The fix was included in the new 23.1 version that was rele4ased few days ago.
Regards,
Mircea.
Thank you for reporting this issue.
The fix was included in the new 23.1 version that was rele4ased few days ago.
Regards,
Mircea.
Mircea Enachescu
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 17
- Joined: Wed May 13, 2015 11:59 pm
Re: Using an entity for block of XML destroys my pretty printing layout
No, I don't think it is. I just upgraded to 23.1, and entered this:
where &some-entity; is an entity with a <para>...</para> as the outermost tags. However, when I press CTRL-SHIFT-P to "pretty print", it still all gets sucked into a single line:
I want my block tag spacing with line breaks to be respected by pretty-print. Stop destroying the white space, please!
If I missed a setting that must be enabled to turn on the "fix", please let me know! Thank you!
Code: Select all
<documentation target="operation-name$parameter">
&some-entity;
</documentation>
Code: Select all
<documentation target="operation-name$parameter"> &some-entity; </documentation>
If I missed a setting that must be enabled to turn on the "fix", please let me know! Thank you!
-
- Posts: 143
- Joined: Tue Mar 25, 2003 11:21 am
Re: Using an entity for block of XML destroys my pretty printing layout
Hello,
Thank you for the feedback!
We implemented this suport for elements only content, as specified by the schema of the document. We cannot detect what is the content of the entity when formatting the document.
Having this in mind we decided that putting entities on a different line is acceptable for elements only content.
For mixed content or text only content elements the entity is treated as a regular text.
Regards,
Mircea.
Thank you for the feedback!
We implemented this suport for elements only content, as specified by the schema of the document. We cannot detect what is the content of the entity when formatting the document.
Having this in mind we decided that putting entities on a different line is acceptable for elements only content.
For mixed content or text only content elements the entity is treated as a regular text.
Regards,
Mircea.
Mircea Enachescu
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Return to “General XML Questions”
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