BR-DEX-04

Any scheme identifier in … MUST be coded using one of the ISO 6523 ICD list.

error: the document is invalid XRechnung Fehlermeldungen und ihre Lösung →

What the rule checks

As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element

Context
cac:PartyIdentification/cbc:ID[@schemeID and $isExtension]
Test
((not(contains(normalize-space(@schemeID), ' ')) and contains($ISO-6523-ICD-EXT-CODES, concat(' ', normalize-space(@schemeID), ' ')))) or ((not(contains(normalize-space(@schemeID), ' ')) and contains(' SEPA ', concat(' ', normalize-space(@schemeID), ' '))) and ((ancestor::cac:AccountingSupplierParty) or (ancestor::cac:PayeeParty)))

Checked with XRechnung 3.0 Invoice (UBL), XRechnung 3.0 Credit Note (UBL)

Context
//ram:GlobalID[@schemeID and $isExtension][not(ancestor::ram:SpecifiedTradeProduct) and not(ancestor::ram:ShipToTradeParty)]
Test
((not(contains(normalize-space(@schemeID), ' ')) and contains($ISO-6523-ICD-EXT-CODES, concat(' ', normalize-space(@schemeID), ' '))))

Checked with XRechnung 3.0 Invoice (CII)