0

I'm not sure this is the place to ask this kind of question.

I have to generate CII compliant XML files. I am looking for a reference XML file that describe a universal XSD Schema that allows to validate XML files against CII standards. After a lot of research I can only find "test" files or example but I can't find the one reference file for CII compliance.

Does that exists? Is there a file given by the people who created the CII standards, that allow us to check if our file is CII compliant? If not, how am i supposed to verify if the file i generate is CII compliant?

aprotiere
  • 35
  • 4
  • 1
    UN/CEFACT Cross Industry Invoice (CII), Check it out here: https://invoice-portal.de/en/xrechnung/ – Yitzhak Khabinsky Jun 28 '23 at 15:11
  • 1
    Its XSDs location: http://docs.oasis-open.org/ubl/os-UBL-2.1/xsd/maindoc/ – Yitzhak Khabinsky Jun 28 '23 at 15:15
  • I might be stupid but I am not sure to understand what the first url is. And the second is for UBL format isn't it? Does the same exists for CII? – aprotiere Jun 28 '23 at 15:22
  • First link gives you an example of an XML file. Second link enlists all the relevant XSD files. – Yitzhak Khabinsky Jun 28 '23 at 15:34
  • So there's no "official" xsd file for CII standards? Only for UBL? – aprotiere Jun 28 '23 at 15:40
  • CII specifications: • XML Schema: http://www.unece.org/cefact/xml_schemas/index (SCRDM CII) • Business Requirement Specification: http://www.unece.org/cefact/brs/brs_index.html • Requirement Specification Mapping: http://www.unece.org/cefact/rsm/rsm_index.html – Yitzhak Khabinsky Jun 28 '23 at 17:56
  • Thanks, I had already seen these. The problem is that inside the CII.xsd, there are comments that say "THIS SCHEMA FILE IS FOR TESTING ONLY AND SHOULD NOT BE USED ON A PRODUCTION SYSTEM". So I am not so confident about using it for my project. Do you have any thoughts about this? – aprotiere Jun 28 '23 at 19:01

1 Answers1

0

The schemas reference standard is here https://unece.org/trade/uncefact/xml-schemas.

However:

  • Cross industry invoice is a quite sophisticated world wide standard, quite a while ago there a task force who investigated for the european subset, which is much smaller and e.g. includes VAT but not sales tax (somehow they also managed to cater for the european exclaves Ceuta and Melilla). That was the Message User Group, MUG.
  • if you want to validate, please also apply schematron, not only schema. Schema mainly provides structure guidance (which attributes and values in which order) but with schematron you can e.g. ensure the invoice date is equal or younger than the delivery date, or that the invoice total amount matches the sum of the lines
  • Also based on the work of the MUG, another task force defined how European CII could be embedded into PDF. The name of the standard is actually a hommage to the MUG (_ZUG_FeRD).
  • if you get the ZUGFeRD infopaket (also available in english) you will get a european CII subset in different completeness levels (called profiles). "Extended" is the biggest profile. They include schematron. And in order to be compliant with mandatory B2G e-invoices they use the mandatory 2016b uncoupled CII version.
  • They refer to, and validate in their schematron, the allowed B2G-codelists (i.e. attributes, e.g. unit codes), also originally collected and contributed by CEF, https://ec.europa.eu/digital-building-blocks/wikis/display/DIGITAL/Registry+of+supporting+artefacts+to+implement+EN16931
  • e.g. the CEN provides schematron for B2G CII (and UBL) checks at https://github.com/ConnectingEurope/eInvoicing-EN16931 . Unfortunately the EN16931 subset is much smaller than the extended subset, e.g. removing order reference per line or early payment discounts (Skonto in germany).
  • But (the european B2G standard) EN16931-1 can be downloaded for free from all european CEN partners (in germany the DIN, whose publishing house Beuth takes the job) and provides calculation rules (and recommendations on max number of digits, rounding) which are often very useful also in B2B and B2C context
  • there are numerous online and offline validators available for ZUGFeRD (now called Factur-X). You might e.g. try my mustangproject, which also runs schema, and schematron (factur-x and CEN) validation, if applicable, also on plain XML files.
  • In all of this documentation one can easily miss that unlike in UBL where the namespace prefixes are merely recommended, in CII the namespace prefixes (like ram:, qdt:, udt: etc.) are actually mandatory (https://www.zugferd-community.net/de/infothek/technical_xml_regarding_fixed_namespace_prefixes_rsm_ram_)
J. Staerk
  • 106
  • 2