Message

Document level amounts cannot have more than 2 decimals

Context
cbc:Amount | cbc:TaxableAmount | cbc:TaxAmount | cbc:LineExtensionAmount | cbc:PriceAmount | cbc:BaseAmount | cac:LegalMonetaryTotal/cbc:*
Test
not(parent::node()/local-name() = 'LegalMonetaryTotal') or string-length(substring-after(., '.')) <= 2