Concept Definition

What is Schematron validation and how is it used in e-invoice compliance?

Schematron is an XML validation language based on XPath assertions. In e-invoicing, Schematron files define business rules that must be satisfied for an invoice to be compliant. For example: 'Every invoice with a taxable amount must have a tax subtotal'; 'The sum of line extension amounts must equal the invoice total line extension amount'; 'If the payment means code is credit transfer, bank account details must be present.' Schematron is the second validation layer after XSD schema validation.

How are Schematron rules published for Peppol and EN 16931?

Peppol Schematron validation: OpenPeppol publishes official Schematron files for Peppol BIS Billing 3.0 and other Peppol document specifications at the OpenPeppol GitHub. The files contain hundreds of assertions covering every business rule in the specification. CEN publishes EN 16931 Schematron. Country-specific additions (CIUS) extend the base Schematron with additional rules. The files are updated with each specification release; compliance platforms must deploy updated Schematron to remain current.

Frequently Asked Questions

How are Schematron errors reported to invoice senders?
Schematron assertion failures produce structured error messages identifying the failed assertion ID (e.g., 'BR-01: An Invoice shall have a Specification identifier'), the error description in human-readable text, and the location in the XML document where the error occurred (expressed as an XPath). E-invoicing platforms collect all Schematron errors, prioritize them by severity (fatal vs warning), and present them as structured error reports to the sender for correction.
What is the difference between fatal errors and warnings in Schematron validation?
Schematron assertions are categorized as either 'error' (fatal) or 'warning' (non-fatal). Fatal errors mean the invoice does not conform to the specification and cannot be processed; the invoice must be corrected before resubmission. Warnings indicate best-practice violations or advisory conditions that do not prevent processing but should be addressed. Peppol BIS Billing 3.0 uses 'error' for mandatory requirements and 'warning' for recommended practices. All fatal errors must be resolved; warnings should be investigated but may not block transmission.

Related Concepts

Related Regulations

Related Use Cases