Subject: | Setting XML_DEBUG_CATALOG causes fatal error |
I've come across a curious bit with the XML_DEBUG_CATALOG
environment variable (which tells libxml2 to output
extra debugging info while resolving entities from catalogs).
The following code snippet works when the variable is
unset, but if you do export XML_DEBUG_CATALOG=
before running it will do the apparent equivalent of die.
The message sounds almost as if it executed:
die "found the entity!"
which seems to be overly enthusiastic :>
I poked a little in LibXML.xs but can't figure out
what is going on other than something reportable
as an error has ended up in saved_error
(but I know next to nothing about xs)
This is happening in Fedora Core 5, perl 5.8.8-5,
perl-XML-LibXML 1.58-2.2.2, libxml2 2.6.23-1.2
======================
#!/usr/bin/perl -w
use XML::LibXML;
my $pubid ="-//OASIS//DTD DocBook XML V4.4//EN";
my $sysid = "docbookx.dtd";
XML::LibXML->load_catalog('/etc/xml/catalog');
my $dtd = XML::LibXML::Dtd->new($pubid,$sysid);
print "Got catalog: $dtd\n";