Skip Menu |
 

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 7668
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: geoffr [...] gbdirect.co.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.56
Fixed in: (no value)

Attachments
xinclude_entity_test.tar.gz



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
Download xinclude_entity_test.tar.gz
application/x-tar 623b

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 709b
[guest - Thu Sep 16 12:13:19 2004]: Show quoted text
> 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>
Appears to be fixed in 1.58 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE foo SYSTEM "/tmp/bibble.dtd"> <foo xmlns:xi="http://www.w3.org/2001/XInclude"> This gets expanded: babble <foo xmlns:xi="http://www.w3.org/2001/XInclude"> This doesn't get expanded: babble </foo> </foo> a
From: Geoff Richards <geoffr [...] gbdirect.co.uk>
Download (untitled) / with headers
text/plain 589b
[Geoff Richards - Mon Oct 4 18:03:54 2004]: Show quoted text
> [guest - Thu Sep 16 12:13:19 2004]: > > Appears to be fixed in 1.58
No, it's definitely still not expanding &bar; for me. Show quoted text
> <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE foo SYSTEM "/tmp/bibble.dtd"> > <foo xmlns:xi="http://www.w3.org/2001/XInclude"> > This gets expanded: babble
This isn't my test. &foo; should expand to 'bibble' not 'babble'. Hmmm, maybe I should have chosen different words. Show quoted text
> <foo xmlns:xi="http://www.w3.org/2001/XInclude"> > This doesn't get expanded: babble > </foo> > </foo> > > a


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.