Technical/XML: Regarding fixed namespace prefixes (rsm:,ram:...)veröffentlicht von usegroup am 02.06.2023
Themen: Grundlagen, Sicherheit & Compliance
XML allows to choose mix different formats using namespaces and those namespaces can have arbitrary namespace prefixes. In UBL there is a recommendation how these prefixes can be named but in CII the namespace prefixes rsm:, ram:, udt:, qdt: and alike are actually mandatory.
Since this is quite surprising and quite under-documented I'll quote Andreas Pelekies who wrote referring to the UN/CEFACT XML Naming and Design Rules v3: There is a chapter about conformance. [R B998] Category 2 states that an organisation can choose to change the prefix, but with a weaker conformance to UN/CEFACT. This leads to usergroup-specific rules.
On the other hand, [R 9224] states that XML Schema (not instance) MUST use the defined structure.
At CEN level this discussion about mandatory prefixes was done as well and guys from the UN/CEFACT library team confirmed the mandatory usage "in practice". This is why EN16931 syntax bindings, XRechnung and all EN16931 based implementations use the fixed namespaces in a mandatory way. In a way, it is mandatory by fact, as UN/CEFACT themselves only use the fixed namespaces in all of their artefacts as well as their Schematron. The latter makes them technically mandatory. The NDR chapter "5.6.2 Namespace Tokens" indeed states that the namespace tokens "will be created using three character representations for each unique namespace". As this NDR is a binding guide for UN/CEFACT and the published schemas and examples are binding, the prefix names are fixed as they are published. For example, [R 9FD1] says that for code lists "clm" MUST be used. In chapter 126.96.36.199 it is referenced again for a different constellation. So the rule from 5.6.2 does not allow prefixes with more or less than 3 characters.
Chapter 188.8.131.52 makes, in general, the prefix mandatorily to be equal to the three letter identifierscheme of common identifier schemes. See also [R 9CCF] with conformance category 1.
Chapter 184.108.40.206 states "uses the namespace token for the data package in which it is defined". As the data package abbreviations are mandatory (RSM, RAM, QDT, UDT, ...) This implicitly makes the prefixes mandatory again.
So in summary, we have explicitly declared a fixed NS clm. Although it is not stated explicitly, the overall figure drawn by the NDR together with the current and all historical publications as well as the CEN/TS 16931-3-3, CEF, XRechnung etc it is mandatory, if full conformance with the NDRs is to be achieved. If someone wants to change this, the respective organisation should make a change request at UN/CEFACT level.