|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-11-03 08:38 UTC] jani@php.net
[2008-11-11 01:00 UTC] php-bugs at lists dot php dot net
[2009-02-11 21:22 UTC] felipe@php.net
[2009-02-19 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 01:00:01 2025 UTC |
Description: ------------ I experienced it using XMLReader, I don't know if it affects other tools too: Even if I set XMLReader to validate XML document against RelaxNG or XSD schema, then libxml_get_errors() will obtain an error: Validation failed: no DTD found! Reproduce code: --------------- libxml_use_internal_errors(true); $XMLReader = new XMLReader; $XMLReader->open('./path/to/file.xml'); $XMLReader->setRelaxNGSchema('./path/to/schema'); $XMLReader->setParserProperty(XMLReader::VALIDATE, true); do { $element = @XMLReader->read(); } while ($element); var_dump(libxml_get_errors()); Expected result: ---------------- array(0) { } Actual result: -------------- array(1) { [0]=> object(LibXMLError)#2 (6) { ["level"]=> int(X) ["code"]=> int(X) ["column"]=> int(X) ["message"]=> string(33) "Validation failed: no DTD found !" ["file"]=> string(X) "./path/to/file.xml" ["line"]=> int(X) } }