Schematron is a rule-based validation language for making assertions about the presence or absence of patterns in XML trees.
[1] The current ISO recommendation is Information technology, Document Schema Definition Languages (DSDL), Part 3: Rule-based validation, Schematron (ISO/IEC 19757-3:2020).
Schemas that use ISO/IEC FDIS 19757-3 should use the following namespace: Schematron rules can be created using a standard XML editor or XForms application.
The W3C's XProc pipelining language, for example, has native support for Schematron schema processing through its "validate-with-schematron" step.
An Apache Ant task can be used to convert Schematron rules into XSLT files.