I am pulling a parameter from the database
<xsl:param name="theMessage"></xsl:param>
The data that is pulled html like below:
<style type="text/css">#container {width:100%; margin-top:20px; text-align:center; font-family: Verdana, arial; font-size:100%; font-weight:normal; }</style><div id="container"><b>Text here</b></div>
The XSL:
<xsl:value-of select="$theMessage" disable-output-escaping="yes" />
And it displays as the code and not the output desired. Any ideas on where I am going wrong? Is it on the xsl side or do I need CDATA in the database etc?
Thanks in advance.
While output escaping has worked for me in the past, it did not do so on this string of data because the data contained ‘ marks which needed to be escaped.
so the string was as such (in java).
And the returnStr was equal to:
<style type="text/css">#container {width:100%; margin-top:20px; text-align:center; font-family: Verdana, arial; font-size:100%; font-weight:normal; }</style><div id="container"><b>Text here</b></div>…plus a lot more html code and textThe xsl param was the same:
And on the stylesheet the new code looked as such:
That pulled the data from the database, stripped out the single quotes, set the string to an xsl parameter, set the parameter to a js variable, then put it inside a div as the html it needed to be – as output.