I’m trying to translate a symbol to its HTML code, e.g. ' to ’ with this code:
<xsl:variable name="apos">'</xsl:variable>
<xsl:variable name="test">’</xsl:variable>
<xsl:value-of select='translate(title, $apos, $test)' />
This works:
<xsl:variable name="test">'</xsl:variable>
But is it possible to make the first example work?
You can use recursion in XSLT 1.0:
Output: