Message

Each VAT breakdown (BG-23) shall have a VAT category rate (BT-119), except if the Invoice is not subject to VAT.

Context
cac:TaxTotal/cac:TaxSubtotal
Test
exists(cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/cbc:Percent) or (cac:TaxCategory[cac:TaxScheme/normalize-space(upper-case(cbc:ID))='VAT']/normalize-space(cbc:ID)='O')
Usage
/ ubl:Invoice / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cbc:Percent
/ ubl:CreditNote / cac:TaxTotal / cac:TaxSubtotal / cac:TaxCategory / cbc:Percent