Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / XSLT

Output a Newline From XSLT

0.00/5 (No votes)
18 May 2011CPOL 6.7K  
Thanks to this page, I found an even shorter alternative. First, you can add an entity in your DOCTYPE section:> ]>You can then use this where you like in the document:&newline;That will get rendered...
Thanks to this page, I found an even shorter alternative. First, you can add an entity in your DOCTYPE section:
C++
<!DOCTYPE stylesheet [
  <!ENTITY newline "<xsl:text>
</xsl:text>"> ]>

You can then use this where you like in the document:
HTML
<div>&newline;</div>

That will get rendered as:
HTML
<div>
</div>

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)