Message

A name must be provided if the listID is "ZZZ".

Context
cac:DespatchLine/cac:Item/cac:CommodityClassification
Test
((normalize-space(cbc:ItemClassificationCode/@listID) = 'ZZZ') and (cbc:ItemClassificationCode/@name)) or (normalize-space(cbc:ItemClassificationCode/@listID) != 'ZZZ') or not (cbc:ItemClassificationCode)
Usage
/ ubl:DespatchAdvice / cac:DespatchLine / cac:Item / cac:CommodityClassification / cbc:ItemClassificationCode