Denmark OIOUBL 2.1 Credit Note
Danish e-invoice credit note (OIOUBL 2.1)
A Danish OIOUBL 2.1 credit note (kreditnota), checked against the UBL 2.1 CreditNote schema and the OIOUBL Schematron.
About
OIOUBL is the Danish adaptation of UBL, sent through NemHandel. A credit note (kreditnota) uses the UBL CreditNote document with the CustomizationID OIOUBL-2.1.
E-invoicing in Denmark: the rules in short and how to check an invoice →
Good to know
- Rules run only when the document matches the schema. Documents over 50 MB are checked against the schema only.
- The rules are NemHandel's OIOUBL Schematron 1.17.2. Their own XSLT is turned into Schematron of the same meaning before they are compiled; the rule ids and levels (F- errors, W- warnings) are the ones their messages name.
- The example is from the test files of the OIOUBL Schematron package, as phive-rules keeps them.
Files
14 files · 2.7 MB · Download all (.zip)-
maindoc/UBL-CreditNote-2.1.xsd main
-
common/UBL-CommonAggregateComponents-2.1.xsd
-
common/UBL-CommonBasicComponents-2.1.xsd
-
common/UBL-CommonExtensionComponents-2.1.xsd
-
common/UBL-QualifiedDataTypes-2.1.xsd
-
common/UBL-UnqualifiedDataTypes-2.1.xsd
-
common/UBL-ExtensionContentDataType-2.1.xsd
-
common/CCTS_CCT_SchemaModule-2.1.xsd
-
common/UBL-CommonSignatureComponents-2.1.xsd
-
common/UBL-SignatureAggregateComponents-2.1.xsd
-
common/UBL-SignatureBasicComponents-2.1.xsd
-
common/UBL-xmldsig-core-schema-2.1.xsd
-
common/UBL-XAdESv132-2.1.xsd
-
common/UBL-XAdESv141-2.1.xsd
The validator loads all of these with their folder structure, so includes and imports resolve as published.
Business rules
Schematron · run in this orderThe 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
dk-oioubl-credit-note.xml · 8.8 KB · passes the schema and the rules
In CI and from code
The same schema by its name, dk-oioubl-credit-note, through the API.
npx @xmlvalid/cli validate "**/*.xml" --schema dk-oioubl-credit-note
- uses: xmlvalid/validate-action@v1
with:
files: "**/*.xml"
schema: dk-oioubl-credit-note
api-key: ${{ secrets.XMLVALID_API_KEY }}
curl https://xmlvalid.com/api/v1/validations \
-H "Authorization: Bearer $XMLVALID_API_KEY" \
-F document=@dk-oioubl-credit-note.xml \
-F schema=dk-oioubl-credit-note
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