To validate a document against a schema written in the XSchema language, follow the steps shown in Section 12.1, “Validation with a Relax NG schema”, with one variation.
Instead of using etree.RelaxNG() to parse
your schema tree , use Setree.XMLSchema(.
S)