The xml document quoted in the following code validates using several on-line services:
libxml_use_internal_errors();
$xml = '<?xml version="1.0" encoding="utf-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader> <fileDesc> <titleStmt> <title/> <author/> </titleStmt>
<publicationStmt> <publisher /> </publicationStmt>
</fileDesc> </teiHeader>
<text>
<body>
<div type="section"><p><label>BLAZE</label>,
a white spot in a horse’s face.</p></div></body></text></TEI>';
$doc = new DOMDocument;
$doc->loadXML($xml);
if($doc->validate()) {
echo "Looks good.";
}
else {
var_dump(libxml_get_errors());
}
Sadly, I get the message "Warning: DOMDocument::validate(): no DTD found!"
What to do?