semantic-crosswalk-editor

Basics on the European e-Invoice Specification (EN16931)

The EU e-Invoice Specification (EN16931)

There is a wonderful online introduction for EN16931 given by the EU and great presentation slides from CEF.

Specification EN16931-3: Details on Syntax Binding

The EU e-invoice specification demands the support of two XML file formats OASIS UBL 1.2 and UN/CEFACT XML Industry Invoice D16B.

EU Syntax Binding

In its 3rd part (EN16931-3) - the deliverable of WG 3 of CEN TC434 - the EU specification binds the XML syntax with the EU e-invoice semantic. For each syntax exist a document, which contains at least two mapping table.

  1. The first “normative table” (see below) describe the syntax binding from the semantic (light grey) to XML (dark grey), Normative Syntax Binding: Semantic to XML (UBL)
  2. Below the desired access to the normative syntax binding as structured XML data instead of PDF (digital paper/stone). Normative Syntax Binding (UBL) as extracted XML
  3. The second “informative table” (see below) describes it the other way around from XML (dark grey) to semantic (light grey). Informative Syntax Binding: XML to Semantic (UBL) The informative table (here Table 3) does not add any new information compared to its preceding sibling the normative table (here Table 2). The informative table starts with the XML part (dark grey), but uses only two of the five XML attributes from the prior normative table. NOTE: In theory, the exact complete data of the informative table should already exist in the preceding normative table.

The above images where overtaken from public EU webinar slides.

Software: EN16931 Data Extractor

The data extractor is a simple Java tool that can be called from command line. It reads from one or more office documents of EN16931-3 the containing syntax binding (or mapping) tables. For each table, each row is being split into the:

The data of each table is being saved in an own XML format to ease reading and testing the data set. This new XML structure is straight forward: A list of semantic entities, each containing the corresponding XML elements as their children.

NOTE: To ease comparison of a “normative table” from the specification with it’s (hopefully identically) “informative table” twin, which has fewer XML columns, the normative table is being saved twice, once with all information and a second time as a subset equal to the informative table infoset, making file comparison easier.