XSD+SCH FNFE-MPE and FeRD · 1.09

Factur-X / ZUGFeRD EN 16931

Factur-X EN 16931 profile (ZUGFeRD COMFORT)

The XML inside a Factur-X or ZUGFeRD PDF, in the profile that matches the European standard EN 16931, checked against the profile schema and the Factur-X EN 16931 rules.

About

Factur-X (France) and ZUGFeRD (Germany) are one specification: a PDF/A-3 invoice with a CII XML file attached. The EN 16931 profile, called COMFORT in ZUGFeRD, carries exactly the data of the European standard.

Two layers are checked: the profile schema, then the profile's Schematron rules. They contain the EN 16931 business rules (BR-CO-15 and so on) and check codes against the code lists FNFE-MPE and FeRD publish with them.

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

Good to know

  • In the validator you can drop the PDF itself: the XML attached to it is taken out in your browser, and the profile is picked from its specification identifier (BT-24). The API and the command-line client take the PDF too. The attachment and its XMP metadata are checked against what Factur-X asks; full PDF/A-3 conformance (fonts, colour) is not.
  • Rules run only when the document matches the schema. Documents over 50 MB are checked against the schema only.
  • The schemas, rules and code lists are copied from the akretion/factur-x library, which ships the official files unchanged. The example is a Factur-X sample from the same library.

Files

4 files · 25 KB
  • en16931/Factur-X_EN16931.xsd main
    1.6 KB View Download
  • en16931/Factur-X_1.09_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd
    3.3 KB View Download
  • en16931/Factur-X_1.09_EN16931_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd
    17.3 KB View Download
  • en16931/Factur-X_1.09_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd
    2.8 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

factur-x-en16931.xml · 62.9 KB · passes the schema and the rules

In CI and from code

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

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

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