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 recommendation 'accept' or 'reject' plus a list of violated rules including their location; only violations flagged 'fatal' lead to 'reject'. Since receiving platforms such as OZG-RE apply the same rules, 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-15 (missing buyer reference). The developer adds the Leitweg-ID in BT-10 and checks again; now the recommendation is 'accept'. 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.
- •'accept' means technical conformity, not factual correctness — wrong but formally valid amounts are not detected by the validator.
Frequently asked questions
Does an 'accept' recommendation 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.