XSD+SCH KoSIT · 3.0.2, rules 2.6.0

XRechnung 3.0 Invoice (CII)

The German e-invoice in CII syntax (also the XML of ZUGFeRD XRECHNUNG profile), checked against the D16B schema, the EN 16931 rules and the XRechnung rules.

About

The CII flavour of XRechnung carries the same content as the UBL one. ZUGFeRD 2 in the XRECHNUNG profile embeds this XML in a PDF; extract it first to check it here.

E-invoicing in Germany: the rules in short and how to check an invoice →

Good to know

  • Rules run only when the document matches the schema. Documents over 50 MB are checked against the schema only.
  • Rule levels follow the KoSIT validator configuration (2026-08-31) for the scenario the document declares (XRechnung, Extension or CVD): a few code list rules are warnings there, a few line rules errors. Its "information" level is shown as a warning.
  • The example is from the XRechnung test suite by KoSIT (Apache License 2.0).

Files

4 files · 140.6 KB
  • uncefact/data/standard/CrossIndustryInvoice_100pD16B.xsd main
    3 KB View Download
  • uncefact/data/standard/CrossIndustryInvoice_QualifiedDataType_100pD16B.xsd
    35.2 KB View Download
  • uncefact/data/standard/CrossIndustryInvoice_ReusableAggregateBusinessInformationEntity_100pD16B.xsd
    95.8 KB View Download
  • uncefact/data/standard/CrossIndustryInvoice_UnqualifiedDataType_100pD16B.xsd
    6.6 KB View Download

The validator loads all of these with their folder structure, so includes and imports resolve as published.

Business rules

Schematron · run in this order

The rules run after the schema check, only when the document matches the schema, and in your browser like the schema check (with SaxonJS by Saxonica). Each finding names its rule, such as BR-CO-15, and the line it points at; each rule has a page with what it checks.

Example document

01.02a-INVOICE_uncefact.xml · 8.7 KB · passes the schema and the rules

In CI and from code

The same schema by its name, xrechnung-3-cii, through the API.

npx @xmlvalid/cli validate "**/*.xml" --schema xrechnung-3-cii
- uses: xmlvalid/validate-action@v1
  with:
    files: "**/*.xml"
    schema: xrechnung-3-cii
    api-key: ${{ secrets.XMLVALID_API_KEY }}
curl https://xmlvalid.com/api/v1/validations \
  -H "Authorization: Bearer $XMLVALID_API_KEY" \
  -F document={{ $schema->example ?? 'document.xml' }} -F schema=xrechnung-3-cii

Free accounts get 100 API validations a month. On Pro, a URL monitor can check a published document against this schema every hour and email you when it breaks. More CI setups