[xml] RELAX NG and xmlreader



First question: has anyone getten RELAX NG validation to work with xmlreader?

Second question, has anyone gotten this to work with XmlReader in PHP?

I seem to just be getting the unhelpful message:

PHP Warning: XMLReader::setRelaxNGSchemaSource() [<a href='function.setRelaxNGSchemaSource'>function.setRelaxNGSchemaSource</a>]: Unable to set schema. This must be set prior to reading or schema contains errors. in /www/elharo/root.php on line 29


no matter what I try. The code looks like this:

    $reader = new XMLReader();
    $reader->setRelaxNGSchemaSource($schema);
    $reader->XML($request);

so I am setting the schema before reading anything; and the same schema works just fine when I test it with xmllint, so I don't think that;s the problem. I've tried both setRelaxNGSchemaSource and setRelaxNGSchema. Any other ideas?

--
ïElliotte Rusty Harold  elharo metalab unc edu
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]