Line breaks in XSLT-generated text document

If you're generating text documents with XSLT transformation and use xsl:text tags for tight whitespace control, you might need to insert the end-of-line characters into the output stream manually. You could do that with a newline within the xsl:text tag, like this:
<xsl:text>
</xsl:text>
However, using explicit newline character (&#xa; or &#10;) results in more explicit code that's easier to read, understand and maintain:
<xsl:text>&#xa;</xsl:text>

No comments:

Post a Comment