DT-CIUS-PT-131

The BT-151 does not meet the defined format: only admits the following values: AA, S, E, RED, INT, NOR, ISE, OUT, NA, Z, AE, IC, G, O.

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
//ubl:Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cbc:ID | //cn:CreditNote/cac:CreditNoteLine/cac:Item/cac:ClassifiedTaxCategory/cbc:ID
Test
(not(contains(normalize-space(.),' ')) and contains(' AA S E RED INT NOR ISE OUT NA Z AE IC G O ',concat(' ',normalize-space(.),' ')))

Checked with Portugal CIUS-PT Invoice (UBL), Portugal CIUS-PT Credit Note (UBL)