BR-FREXT-CL-20-LISTID
ListID for Charges and Tax reason code, if present, SHALL be equal to 7161 or 5153
error: the document is invalid
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:AllowanceCharge[cbc:ChargeIndicator = true()]/cbc:AllowanceChargeReasonCode[@listID !='']
Test
((not(contains(normalize-space(./@listID), ' ')) and contains(' 7161 5153 ', concat(' ', normalize-space(./@listID), ' '))))
Checked with France EXTENDED-CTC-FR (UBL)
Context
ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator = true()]/ram:ReasonCode[@listID!='']
Test
((not(contains(normalize-space(./@listID), ' ')) and contains(' 7161 5153 ', concat(' ', normalize-space(./@listID), ' '))))
Checked with France EXTENDED-CTC-FR (CII)