Hey I have a node <msg> which contains a message such as
string1
string 2
sting3
but however when it renders, it renders all one line how can i replace all \n with <br />'s.
i've tried
<xsl:value-of select='replace(msg, "
", "<br/>")' />
but i get this error
Error loading stylesheet: Invalid XSLT/XPath function.
how do i do this?
Try this above tag
You can also achieve this by simple HTML tag,
Try this
<pre>
tag before your msg and close it after msg.Call this template on the string you want to process:
Like this (it will work on the current node):
or like this, explicitly passing a parameter:
I think you are working with an XSLT 1.0 processor, whereas replace() is a function that has been introduced with XSLT/XPath 2.0.