Class Schematron

Pass a root Element or an ElementTree to turn it into a validator.
Alternatively, pass a filename as keyword argument 'file' to parse from
the file system.

Schematron is a less well known, but very powerful schema language. The main
idea is to use the capabilities of XPath to put restrictions on the structure
and the content of XML documents. Here is a simple example:

Schematron was added to libxml2 in version 2.6.21. Before version 2.6.32,
however, Schematron lacked support for error reporting other than to stderr.
This version is therefore required to retrieve validation warnings and
errors in lxml.