Schematron
Rick Jelliffe's Schematron is a radically different approach to schema languages. Whereas other schema languages are conservative (everything not permitted is forbidden), Schematron is liberal (everything not forbidden is permitted). A Schematron schema makes assertions about the content of the document. If all assertions are true, the document is valid. Since the assertions are written in XPath, Schematron can state things that no other schema language can. Here are some examples.
The entire document contains exactly ten paragraph elements (which may be nested inside each other).
Every FirstName element is followed by a LastName element, regardless of the parent element.
If the CPU attribute of a Machine element has the value Sparc ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access