Subject: | xinclude breaks entity expansion |
Hi,
I've found a bug. I'm mostly testing with XML::LibXML 1.56, but the bug seems to still be alive in CVS HEAD.
The problem is: I parse a file that uses xinclude to include another XML file. They both have the same DTD, which declares an entity. If the included one uses an entity reference it isn't expanded when it should be. It can be expanded in the 'outer' XML document.
I've attached all the things needed to reproduce this, in a tarball.
Just for the record, when I run the attached test.pl I get this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE foo SYSTEM "test.dtd">
<foo xmlns:xi="http://www.w3.org/2001/XInclude">
This gets expanded: bibble
<foo xmlns:xi="http://www.w3.org/2001/XInclude">
This doesn't get expanded: &bar;
</foo>
</foo>
It looks like this is a problem with the Perl binding, not libxml2, because the expansion of &bar; does work with this command:
xmllint --valid --noent --xinclude test.xml
This is all tested against libxml2 version 2.6.11 on Debian Sarge.
qef
Message body not shown because it is not plain text.