Message

For Swedish suppliers, the Swedish VAT-numbers must have the trailing 12 characters in numeric form

Context
//cac:AccountingSupplierParty/cac:Party[cac:PostalAddress/cac:Country/cbc:IdentificationCode = 'SE' and cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/substring(cbc:CompanyID, 1, 2) = 'SE']
Test
string(number(substring(cac:PartyTaxScheme[cac:TaxScheme/cbc:ID = 'VAT']/cbc:CompanyID, 3, 12))) != 'NaN'
Usage
/ ubl:Invoice / cac:AccountingSupplierParty / cac:Party / cac:PartyTaxScheme / cbc:CompanyID