Scheme identifier for the delivery location

Error BR-DEX-08 XRechnung

Any scheme identifier for a Delivery location identifier in <name/> MUST be coded using one of the ISO 6523 ICD list.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The value of schemeID for the delivery location identifier is not a single identifier from the ISO 6523 ICD code list. The value must not contain a space.

What the rule means

The scheme identifier indicates the identification system used for the delivery location identifier. An ICD value from the ISO 6523 list identifies that system unambiguously.

Please use an allowed scheme identifier for the delivery location

A scheme identifier is provided for the delivery location in ram:GlobalID, but it is not accepted by this check. You can correct it using an identifier from the allowed ISO 6523 ICD list.

What to do
  1. Check the value of schemeID in the delivery location’s ram:GlobalID.
  2. Use a single identifier from the ISO 6523 ICD list.
  3. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:GlobalID schemeID="0088 0208">1234567890123</ram:GlobalID>
✓ Correct
<ram:GlobalID schemeID="0088">1234567890123</ram:GlobalID>
Technical details

When @schemeID is present, the test checks that its normalized value contains no space and occurs in $ISO-6523-ICD-EXT-CODES.

Where the rule applies

The rule applies to ram:GlobalID of ram:ShipToTradeParty within ram:ApplicableHeaderTradeDelivery when schemeID is present and the rule applies to an extension.

Context (rule/@context)
ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:GlobalID[@schemeID and $isExtension]
Test expression (assert/@test)
(( not(contains(normalize-space(@schemeID), ' ')) and contains($ISO-6523-ICD-EXT-CODES, concat(' ', normalize-space(@schemeID), ' ')) ))