I can also reproduce this bug in debian with these test files:

[EMAIL PROTECTED]:~/phpxslbugtest$ cat test.xml
<?xml version='1.0'?>
<test>
       <tag attribute='somethingwith&amp;anamp'>content&amp;</tag>
</test>
[EMAIL PROTECTED]:~/phpxslbugtest$ cat test.xsl
<?xml version='1.0'?>
<!DOCTYPE xsl:stylesheet [<!ENTITY nbsp "&#160;">]>

<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

       <xsl:template match='/test'>
               <xsl:copy-of select='.'/>
       </xsl:template>

</xsl:stylesheet>
[EMAIL PROTECTED]:~/phpxslbugtest$ xsltproc test.xsl test.xml
error : unterminated entity reference           anamp
<?xml version="1.0"?>
<test>
       <tag attribute="somethingwith">content&amp;</tag>
</test>


I looked at the libxml code and found that the error occurs because somewhere in the process the entity is interpreted and the interpreted value is passed to libxml2's xmlStringGetNodeList function (which actually throws the error). A very dirty workaround is to use constructions like &amp;amp;

Ron


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to