Home/Glossary/Schematron
S

Schematron

Rule-based XML validation language used to enforce business rules in EN 16931, PEPPOL, and ZUGFeRD invoices.

Schematron is an ISO standard (ISO/IEC 19757-3) for validating business rules in XML documents. Where XSD checks whether the XML is structurally correct (right elements, right order, right data types), Schematron checks whether the data makes sense — rules like "if VAT rate is 0%, an exemption reason must be provided" or "the invoice total must equal the sum of line amounts".

Schematron rules are written as XPath assertions, which doesn't require deep XML expertise to read. In e-invoicing, every major format ships its own Schematron rule set: EN 16931, PEPPOL BIS Billing 3.0, ZUGFeRD, and XRechnung all have published rule files that an invoice must pass before it will be accepted by a recipient's system.

Key facts

  • ISO standard: ISO/IEC 19757-3
  • Uses XPath assertions inside <assert> and <report> elements
  • Applied after XSD validation as a second validation pass
  • Official EN 16931 Schematron rules maintained by CEN/TC 434