Schematron

Schematron Rule-Based Validation

Schematron (ISO/IEC 19757-3, latest edition 2025) checks rules rather than shape: XPath assertions with human-readable messages. Implementations compile a schema into an XSLT stylesheet that reports in SVRL (Schematron Validation Report Language). SchXslt2 (codeberg.org/SchXslt/schxslt2 (https://codeberg.org/SchXslt/schxslt2 3,719 ), MIT) is a single XSLT 3.0 file that does the compiling on Saxon-HE 726,956 :

Installing the SchXslt2 transpilerShell
mkdir -p ~/xml-tools/schxslt2 && cd ~/xml-tools/schxslt2
curl -fsSLO --retry 5 --retry-all-errors \
  https://codeberg.org/SchXslt/schxslt2/releases/download/v1.11.2/schxslt2-1.11.2.zip
unzip -oq schxslt2-1.11.2.zip && ls schxslt2-1.11.2/*.xsl
Output
schxslt2-1.11.2/transpile.xsl

Subsections