Re: [xslt] Use character entities to represent non-ASCII characters



On 22/08/2022 16:46, Paul Kinnucan wrote:
Specifying HTML as the output type does not cause libxslt to generate ASCII with character entities for 
non-ASCII characters.

It works for me:

$ cat t.xsl
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="html" encoding="HTML"/>
<xsl:template match="/">
    <p>£</p>
</xsl:template>
</xsl:stylesheet>
$ xsltproc t.xsl t.xsl
<p>&pound;</p>

Note that the output *encoding* must be set to "HTML".

Nick



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]