Document level allowances and charges details MUST have allowance and charge VAT category if the credit note has a VAT total amount
/ubl:CreditNote/cac:AllowanceCharge
((/ubl:CreditNote/cac:TaxTotal/*/*/*/cbc:ID = 'VAT') and (cac:TaxCategory/cbc:ID)) or not(/ubl:CreditNote/cac:TaxTotal)