Click here to Skip to main content
15,886,199 members
Articles / Programming Languages / XSLT
Alternative
Tip/Trick

Output a Newline From XSLT

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
18 May 2011CPOL 6.5K   1  
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)


Written By
Web Developer
United States United States

  • Managing Your JavaScript Library in ASP.NET (if you work with ASP.net and you don't read that, you are dead to me).
  • Graduated summa cum laude with a BS in Computer Science.
  • Wrote some articles and some tips.
  • DDR ("New high score? What does that mean? Did I break it?"), ping pong, and volleyball enthusiast.
  • Software I have donated to (you should too):

Comments and Discussions

 
-- There are no messages in this forum --