I'm having a problem. How can I instruct my XSLT to insert a new line?
Here's an example of my XML:
<message>Hello World!!! \r\n How You G开发者_如何学Cuys Doing?!?</message>
or:
<message>Hello World!!! <br /> How You Guys Doing?!?</message>
and here's the XSL:
<html><body><xsl:valeof select="message"/></body></html>
Assuming the input
<message>Hello World!!! <br /> How You Guys Doing?!?</message>
it should suffice to use
<xsl:copy-of select="message/node()"/>
in your XSLT. Replacing \r\n is more difficult, at least in XSLT 1.0. See http://www.dpawson.co.uk/xsl/sect2/N7240.html#d10122e406 for a possible approach.
精彩评论