There are some user defined entites in the xml data. In order to unescape those entities, we are using entity reference in the DOCTYPE mentioned in the below code:-
<!DOCTYPE xsl:stylesheet [
<!ENTITY sect "&sect;">
]>
<xsl:stylesheet version='3.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >
<xsl:output method="xml" omit-xml-declaration="no" use-character-maps="mdash" />
<xsl:character-map name="mdash">
<xsl:output-character character="—" string="&mdash;"/>
<xsl:output-character character="&" string="&amp;" />
<xsl:output-character character=""" string="&quot;" />
<xsl:output-character character="'" string="&apos;" />
<xsl:output-character character="§" string="&sect;" />
</xsl:character-map>
<!--=================================================================-->
<xsl:template match="@* | node()">
<!--=================================================================-->
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
while execution, we face the below error:-
Error at xsl:output-character on line 11 column 64
XTSE0020: character attribute must be a single XML character
This error is for sect entity on line 11.
In the DTD, instead of !ENTITY sect "&sect;"
use !ENTITY sect "§"
.