XSD+SCH CEN/TC 434, UN/CEFACT · CII D16B, rules 1.3.16

EN 16931 Invoice (CII)

A Cross Industry Invoice checked against the D16B schema and the EN 16931 business rules: the XML inside Factur-X and ZUGFeRD (EN 16931 profile).

About

CII is the second syntax of EN 16931. The rules are the same business rules as for UBL, bound to CII elements, plus the code list checks the uncoupled D16B schema leaves out.

To check a Factur-X or ZUGFeRD invoice, extract the embedded factur-x.xml or zugferd-invoice.xml from the PDF first.

Good to know

  • Rules run only when the document matches the schema. Documents over 50 MB are checked against the schema only.
  • The example is from the EN 16931 validation artefacts by the European Commission (EUPL 1.2).

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

CII_example1.xml · 33.7 KB · passes the schema and the rules

In CI and from code

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

npx @xmlvalid/cli validate "**/*.xml" --schema en16931-cii
- uses: xmlvalid/validate-action@v1
  with:
    files: "**/*.xml"
    schema: en16931-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=en16931-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