XRechnung 2.4.0 · UBL

BR-DEX-06

XRechnung 2.4.0 · UBL

fatalcountry

Original rule text

[BR-DEX-06] Any scheme identifier in MUST be coded using one of the ISO 6523 ICD list.

Stored validation assertion
((not(contains(normalize-space(@schemeID), ' ')) and contains($ISO-6523-ICD-EXT-CODES, concat(' ', normalize-space(@schemeID), ' '))))

What this rule requires

This rule applies to item standard identification identifiers that carry a schemeID and occur in a document using the XRechnung extension. It requires the schemeID attribute, after trimming surrounding whitespace, to contain no internal spaces and to be exactly one of the codes listed in the rule's $ISO-6523-ICD-EXT-CODES (for example 0002, 0088, XR01). It fails if the attribute is empty or whitespace-only, contains spaces inside the value, or is not one of those codes.

How to fix

On the relevant element (cac:StandardItemIdentification/cbc:ID in UBL, ram:SpecifiedTradeProduct/ram:GlobalID in CII), set the schemeID attribute to a single valid ISO 6523 ICD code from the allowed list, without any spaces inside the code. For example, use 0002 or XR01 as appropriate. Ensure only one code is provided; if you currently have multiple codes separated by spaces, keep only the applicable one. If the code you used is not in the list, look up the correct ISO 6523 ICD code for the item identification scheme.

Guidance on this rule. The original text above is authoritative.