Re: [xsl] Stripping white space ? How do I get new line back

Subject: Re: [xsl] Stripping white space ? How do I get new line back
From: Jesper Tverskov <jesper.tverskov@xxxxxxxxx>
Date: Mon, 23 Feb 2009 09:21:54 +0100
> How do I get line break (new line) back?

The browser strips this whitespace, you need to use <br>.
Nasty business in XSLT 1.0, here is one way odf doing it:

<p><xsl:value-of  disable-output-escaping="yes"
select="concat(substring-before(table/row[@output='litAP1WhyIJoined']/@content,
'&#xD;&#xA;&#xD;&#xA;'), '&lt;br>&lt;br>',
substring-after(table/row[@output='litAP1WhyIJoined']/@content,
'&#xD;&#xA;&#xD;&#xA;') )"/></p>

Cheers,
Jesper Tverskov

http://www.xmlkurser.dk
http://www.xmlplease.com

Current Thread