character-map_1-input.xml
<?xml version="1.0"?>
<test>© 1850 by Søren Kierkegaard</test>
character-map_1-stylesheet.xsl
<?xml version="1.0"?>
<xsl:stylesheet
version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:character-map
name="a">
<xsl:output-character
character="ø" string="o"/>
<xsl:output-character
character="©" string="Copyright ©"/>
</xsl:character-map>
<xsl:output
indent="yes" use-character-maps="a"/>
<xsl:template
match="/">
<xsl:value-of
select="test"/>
</xsl:template>
</xsl:stylesheet>
character-map_1-output.xml
<?xml version="1.0" encoding="UTF-8"?>
<test>Copyright © 1850 by Soren Kierkegaard</test>
xsl:output-character used inside xsl:character-map can only take one character and replace it with something else in output. It can also be used instead of the "disable-output-escaping" attribute in xsl:value-of and xsl:text. "DOE" is deprecated in XSLT 2.0.
The spec has many good examples: http://www.w3.org/TR/xslt20/#element-character-map.
Updated 2009-03-19