XSLT gives me quite a headache. Learning any new language can be frustrating at first, but XSLT seems to be lacking in good documentation, which makes it orders of magnitude worse.
The other day, I was trying to pass some HTML in a parameter to an XSLT template. In my template, I was using
<xsl:value-of select="$htmlParam"/> to access this HTML. What I couldn’t understand was that all the HTML was getting stripped out, leaving only the text.
Thanks to Tom at work, I now know that I needed to use
xsl:copy-of instead of
It seems to make sense now, but I would have never figured it out on my own. I wonder how many other people get tripped up on this.