Monthly Archives: January 2012

Passing Through Html Markup in an XSLT Parameter

I needed to provide a line break in a descriptive paragraph so had to embed a bit of markup. I was attempting to encode it or escape it somehow, but there is a simpler solution:

You simple add the highlighted element found in the following snippet:

<xsl:value-of select=”mydata” disable-output-escaping=”yes” />

This passes through the <br/> without messing with it. 

I found the answer here:

http://www.sitepoint.com/forums/showthread.php?200875-Pass-HTML-to-XSLT-as-Param

Advertisements