DOM XML won't resolve locally parsed entities that are declared in my DTD. Do I need a parser that validates, or is my DOM module broken? ;P
I've included my test setup below. test.php will output only "Foobar:". The GNOME project's xmllint says my documents are valid (using --valid). What am I missing?
Thanks!
Nick
test.dtd:
<!ELEMENT TEST ( #PCDATA )>
<!ENTITY FOOBAR "A foobar goes here.">
test.xml:
<?xml version="1.0"?>
<!DOCTYPE TEST SYSTEM "test.dtd">
<TEST>Foobar: &FOOBAR;</TEST>
test.php:
if ( !($doc = xmldocfile('test.xml'))) {
echo "Couldn't parse document.";
exit;
}
$root = $doc->root();
echo $root->content;