Preserve newlines between elements
Are you missing a feature? Request its implementation here.
-
- Posts: 96
- Joined: Wed Feb 09, 2005 8:57 am
Preserve newlines between elements
Say there is an XML document:
<root>
<xsl:template match="div1/head|inform-div1/head">
<h2><xsl:call-template name="head"/></h2>
</xsl:template>
<xsl:template match="div2/head">
<h3><xsl:call-template name="head"/></h3>
</xsl:template>
<xsl:template match="div3/head">
<h4><xsl:call-template name="head"/></h4>
</xsl:template>
</root>
and invoke [Document] - [XML Document] - [Format and indent].
It removes newlines between </xsl:template> and <xsl:template>.
I think this makes the document rather hard to read.
It is appreciated if there is an option to keep those newlines.
Stylus Studio has it. ([Preserve newlines between elements])
<root>
<xsl:template match="div1/head|inform-div1/head">
<h2><xsl:call-template name="head"/></h2>
</xsl:template>
<xsl:template match="div2/head">
<h3><xsl:call-template name="head"/></h3>
</xsl:template>
<xsl:template match="div3/head">
<h4><xsl:call-template name="head"/></h4>
</xsl:template>
</root>
and invoke [Document] - [XML Document] - [Format and indent].
It removes newlines between </xsl:template> and <xsl:template>.
I think this makes the document rather hard to read.
It is appreciated if there is an option to keep those newlines.

Stylus Studio has it. ([Preserve newlines between elements])
-
- Site Admin
- Posts: 2096
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
I will add this as an enhancement on our bugzilla.
The way I work for instance is to add a comment between templates. That allowss you to keep them separated after a format and indent action and also to describe what each template does.
Also you may consider using the Indent selection action instead of format and indent. That is available from the contextual menu and performs only line indenting, leaving the same number of lines.
Best Regards,
George
I will add this as an enhancement on our bugzilla.
The way I work for instance is to add a comment between templates. That allowss you to keep them separated after a format and indent action and also to describe what each template does.
Also you may consider using the Indent selection action instead of format and indent. That is available from the contextual menu and performs only line indenting, leaving the same number of lines.
Best Regards,
George
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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