Preserve newlines between elements
Posted: Fri Feb 25, 2005 12:11 am
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])