RelaxNG Validation
OASIS RELAX NG Validation
Index > Books > Declarative Development Guide > Technology Tour > XML Validation > RelaxNG Validation

Rate this page:
Really useful
Satisfactory
Not helpful
Confusing
Incorrect
Unsure
Extra comments:


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.

© 2003,2004, 1060 Research Limited. 1060 registered trademark, NetKernel trademark of 1060 Research Limited.