RELAX NG Validation
RelaxNG is an intuitive declarative schema technology that's powerful, quick to write, and easy to use
and maintain.
A document can be validated against a RelaxNG schema using the validateRNG accessor. The validateRNG
accessor is provided by the ext_xml module.
Here is
an example that validates the first act of King Lear against a Relax NG schema for an Act.
The result is a canonical boolean document with value true.
-
King Lear Act1 in XMLview
-
The Act Relax NG schema view
Here is
another example but in this case the document has been deliberately corrupted. This shows the error handling with
XPath locations. XPath error handling can be switched off for high performance.