I wish to generate a generic code for parsing special characters in xslt
问题 I wish to generate a generic code for parsing special characters in xslt. I wish to replace all special characters found in any node of the xml document with symbols of my choice. eg special characters= "®"; also" ©"; etc I have tried something like follows but nothing happens. <xsl:template match="*"> <xsl:choose> <xsl:when test="contains(.,'–')"> <xsl:value-of select="replace(.,'–','-')" /> </xsl:when> </xsl:choose> </xsl:template> the function of character output is: