Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: tony.hennessy [...] bbc.co.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 1.57
  • 1.58
Fixed in: (no value)



Subject: base parameter ignored when load_ext_dtd is used
When I run the following perl script (with dtd file) using XML::LibXML 1.58 or 1.57 a parse error is returned. We are using perl, v5.8.7 built for sun4-solaris perl, v5.6.1 built for sun4-solaris The same script run using XML::LibXML 1.56 returns OK. I hope the script is self explanatory on what I am trying todo. Version 1.58 seems to ignore the 'base' parameter. The question is... is this a bug or have we been using an undocumented feature? use File::Spec; use XML::LibXML; my $parser = XML::LibXML->new(); $parser->load_ext_dtd(1); $parser->validation(1); my $base = File::Spec->catfile( File::Spec->curdir(), 'not_there', 'imaginary.xml' ); my $xml = <<'__MYXML__'; <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE foo SYSTEM "../fred.dtd"> <foo> <bar>1</bar> </foo> __MYXML__ my $doc = eval { $parser->parse_string($xml,$base) }; if ( $@ ) { print "parse error: $@"; } else { print "OK\n"; } with the following DTD file in the same directory as the script and called fred.dtd <!ELEMENT foo (bar)*> <!ELEMENT bar (#PCDATA)>