If this is text.xsl:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/">
<root><xsl:text>This is the HTML entity for the © symbol: &copy;</xsl:text></root>
</xsl:template>
</xsl:stylesheet>
And this is test.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<root/>
Then the XSLT processor should output:
Code:
<root>
This is the HTML entity for the © symbol: ©
</root>
Change output method to "text" and the <root> tags are removed, but the text stays the same.
That works for any entity you care to enter because the & is converted to & in the output. Now the only thing to worry about is whether or not the parser which reads the output of the XSLT understands ©. If not, then use the Unicode code point because any conforming XML parser is required to handle that.
Bookmarks