xsl-list
[Top] [All Lists]

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

2009-02-23 03:22:17
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[(_at_)output='litAP1WhyIJoined']/@content,
'&#xD;&#xA;&#xD;&#xA;'), '&lt;br>&lt;br>',
substring-after(table/row[(_at_)output='litAP1WhyIJoined']/@content,
'&#xD;&#xA;&#xD;&#xA;') )"/></p>

Cheers,
Jesper Tverskov

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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>