Hi,

I have a problem with special characters disappearing from my XML when I run
it through SabloTron.  Consider the cases of two characters I know and love,
the UK pound (�) and the single quote, or acute (').  Here is a run that
illustrates this:

odd.xsl
-------
<?xml version="1.0"?> 
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
        <xsl:apply-templates/>
</xsl:template>

<xsl:template match="allproducts">
        1 UK Pound [<xsl:value-of select="quid"/>]
        1 Ampersand [<xsl:value-of select="amp"/>]
        1 Acute [<xsl:value-of select="acute"/>]
</xsl:template>

</xsl:stylesheet>

odd.xml
-------
<?xml version="1.0" standalone="no"?>
<!DOCTYPE moreovernews SYSTEM
"http://p.moreover.com/xml_dtds/moreovernews.dtd">

<allproducts>
        <quid>&pound;</quid>
        <amp>&amp;</amp>
        <acute>&acute;</acute>
</allproducts>


Output
------
<?xml version="1.0" encoding="UTF-8"?>
        1 UK Pound []
        1 Ampersand [&amp;]
        1 Acute []

As you can see the other two special characters (which both exist and are
browser legal) just disappear without trace.  This is causing me 'something
of an issue' as I can't put pound signs into our web site.

Is this by design, and if so is there any way round it?  

I've tried using the &#163; syntax to specify a pound sign, but a '£'
(Ascii 194, Ascii 163) appears in the document when I parse it, and is
subsequently displayed in the browser.  This also looks a bit silly.

Any help is much appreciated.

Thanks,

Nick Vincent
NeoWorks Ltd

Reply via email to