Message

Value MUST be part of code list 'ISO 4217 Currency codes'.

Context
/ubl:DespatchAdvice/cac:Shipment/cac:TransportHandlingUnit/cac:Package/cac:GoodsItem/cbc:DeclaredStatisticsValueAmount
Test
not(@currencyID) or (some $code in $clISO4217 satisfies $code = @currencyID)
Code lists
ISO 4217 Currency codes
Usage
/ ubl:DespatchAdvice / cac:Shipment / cac:TransportHandlingUnit / cac:Package / cac:GoodsItem / cbc:DeclaredStatisticsValueAmount / @currencyID