From: remy dot damour at laposte dot net Operating system: ubuntu intrepid PHP version: 5.2.8 PHP Bug Type: XML Reader Bug description: XMLReader::setRelaxNGSchema() fails
Description: ------------ Each time I call XMLReader::setRelaxNGSchema() or XMLReader::setRelaxNGSchemaSource() it ends up with an error message. My relax-ng content looks valid, it's succefully loaded and used for parsing xml with both xmllint (from package libxml2-utils) and sun-microsystem "msv" (https://msv.dev.java.net/) validator. Reproduce code: --------------- <?php $rng_schema = <<<RNG <?xml version="1.0"?> <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> <start> <element name="node1"><text/></element> </start> </grammar> RNG; $xml_reader = new XMLReader(); $xml_reader->setRelaxNGSchemaSource($rng_schema); Expected result: ---------------- no error message Actual result: -------------- Warning: XMLReader::setRelaxNGSchemaSource() [xmlreader.setrelaxngschemasource]: Unable to set schema. This must be set prior to reading or schema contains errors. in /var/www/test.php on line 12 -- Edit bug report at http://bugs.php.net/?id=46978&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46978&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46978&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46978&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46978&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46978&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46978&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46978&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46978&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46978&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46978&r=support Expected behavior: http://bugs.php.net/fix.php?id=46978&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46978&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46978&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46978&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46978&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46978&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46978&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46978&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46978&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46978&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46978&r=mysqlcfg