Message

Reason code MUST be according to UNCL 7161 D.16B.

Context
cac:AllowanceCharge[cbc:ChargeIndicator = 'true']/cbc:AllowanceChargeReasonCode
Test
some $code in $UNCL7161 satisfies normalize-space(text()) = $code
Usage
/ ubl:Invoice / cac:AllowanceCharge / cbc:AllowanceChargeReasonCode
/ ubl:Invoice / cac:InvoiceLine / cac:AllowanceCharge / cbc:AllowanceChargeReasonCode
/ ubl:CreditNote / cac:AllowanceCharge / cbc:AllowanceChargeReasonCode
/ ubl:CreditNote / cac:CreditNoteLine / cac:AllowanceCharge / cbc:AllowanceChargeReasonCode