rnc_validate.py exports this interface.
An exception class that inherits from Python's
standard Exception class. This exception will be
raised when an XML file is found not to be valid
against the given Relax NG schema. The
str() function, applied to an instance of
this exception, returns a textual description of
the validity error.
This class constructor takes one argument, a path
name to a schema in either
format. Assuming that the situation meets all the
assumptions enumerated in Section 15.1, “Design of the
rnc_validate module”, it returns a new
RelaxValidator instance that can be used
to validate XML files against that schema.
If anything goes wrong, the constructor raises a
ValueError exception. This can
happen for several reasons, for example: failure to
read the schema; failure to write the
file if translating from
.rnc format; if the
.rng file is not well-formed or not a valid
Relax NG schema.
method takes as its argument an
containing an XML document. If that document is
valid against the schema, this method returns
None. If there is a validation problem,