Tool
XRechnung Validator (KoSIT)
Definition
The XRechnung Validator is a command-line tool developed by KoSIT and released as open source for checking XRechnung documents for conformity. It validates both XML schema validity (XSD) and content-level business rules via Schematron. The tool is regularly updated when new XRechnung versions are released and serves as the reference implementation for validation.
Background & context
The KoSIT validator is the official reference implementation for checking electronic invoices in Germany. It is available as an open-source Java tool and is configuration-driven: the actual check rules are not in the validator itself but in a separate 'validator-configuration' (for XRechnung: validator-configuration-xrechnung) that bundles the XSD schemas and Schematron rules of a particular standard version. Checking runs in two stages: first the validator checks the XML schema validity (XSD) — is the document a well-formed, structurally correct UBL or CII file at all? Then it evaluates the Schematron rules, i.e. the content-level business rules of EN 16931 (BR-, BR-CO-, BR-S- …) and the German extension (BR-DE-). The result is a machine-readable validation report with the overall verdict 'conformant' or 'not conformant' plus a list of violated rules including their location. Since the receiving platforms ZRE and OZG-RE use the same logic, the validator can be used to check in advance whether an invoice would be accepted there.
In practice — a worked example
Before sending, a developer checks the generated XRechnung locally with the KoSIT validator and the current XRechnung configuration. The report flags a violation of BR-DE-2 (missing buyer reference). The developer adds the Leitweg-ID in BT-10 and checks again; now the result is 'conformant'. Only then does it transmit the file via Peppol to the authority — thus avoiding a later rejection by the receiving portal.
Common mistakes
- •Running the validator with an outdated configuration: after an XRechnung update, previously valid invoices may fail.
- •'conformant' means technical conformity, not factual correctness — wrong but formally valid amounts are not detected by the validator.
Frequently asked questions
Does a 'conformant' verdict replace the business review?
No. The validator checks structure and business rules, but not whether the invoice content is factually correct. A formally valid invoice can still be substantively wrong.
Which configuration do I need for XRechnung?
The validator-configuration-xrechnung in the version matching the XRechnung release accepted by your recipient. It contains the appropriate XSD and Schematron rules.