[Yanel-dev] Keeping line breaks in XSLT
Mehmet Birgi
mehmet.birgi at wyona.com
Tue Apr 20 09:55:10 CEST 2010
When your content that is transformed through XSLT has line breaks that need
to be preserved, you should use <xsl:copy-of> instead of <xsl:value-of> in
your stylesheet. Here is an example:
The original XML snippet:
<node href=3D"xyz">
<name>Foo &<br/>Bar</name>
</node>
When you apply <xsl:value-of select=3D"node/name"/> in your stylesheet, you
get:
Foo &Bar
but when you use <xsl:copy-of select=3D"node/name"/>, you get:
Foo &
Bar
HTH, cheers,
Memo
-- =
Mehmet Birgi
www.wyona.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wyona.org/pipermail/yanel-development/attachments/2010042=
0/75804a2c/attachment.htm
More information about the Yanel-development
mailing list