[Expat-discuss] numeric entities

Lee Brown lee at puddledock.net
Sun Nov 21 23:27:16 CET 2004


The handling of numeric entities changed between releases 1.95.5 and 1.95.8, such that in 1.95.8 numeric entities seem to be ignored during output.

Example XSL file:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text"/>
<xsl:template match="/test">
        <xsl:for-each select="line">
                <xsl:value-of select="."/>
                <xsl:text>&#64;</xsl:text>
                <xsl:text>&amp;</xsl:text>
        </xsl:for-each>
</xsl:template>
</xsl:stylesheet>

Example XML input file:

<?xml version="1.0"?>
<test>
<line>line one</line>
<line>line two</line>
<line>line three</line>
</test>

I'm using Sablotron's sabcmd.  When linked with expat 1.95.5 each output line is followed by an at-sign (#64) and an ampersand.  When linked with expat 1.95.8 each line is followed only by an ampersand.

Is this intentional?  Or am I the only one experiencing this (I have my own port of expat built from source)?  Anyone know how to write out the value of a numeric entity?

Thanks,
Lee


More information about the Expat-discuss mailing list