there are many special character parameters in the input XML like & ndash; , & mdash; , & rsquo;
is there a way i can replace them with – for &ndash and similarly for others
my xslt is defined as
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="html" omit-xml-declaration="yes" indent="yes" />
<xsl:strip-space elements="*" />
<xsl:param name="pDest" select="'XSLT_Transform/Output/'" />
<xsl:template match="CHAPTER">
<xsl:variable name="token" select="tokenize(@ABC,'-')[last()]" />
<xsl:variable name="chapVal" select="replace($token,'C','')" />
<!--<xsl:variable name="chapVal" select="replace($val,'_','-')"/> -->
<xsl:result-document href="{$pDest}chapter{$chapVal}.xhtml"
i believe they are supposed to transform automatically referring to the dtd should i change encoding?
Entity references such as
–
are expanded automatically by the XML parser before the XSLT processor gets to see them; to the XSLT processor they are treated like ordinary characters. The XML or HTML serializer will output them as ordinary characters if the chosen encoding of the output file includes these characters, otherwise the serializer will output them as character references (for example–
.I hope this information helps. You haven't really said what your problem is, so all I can do is give background information.