Message

Shipment gross weight measure SHALL match the gross weight of the transport handling units specified

Context
cac:Shipment
Test
not(cbc:GrossWeightMeasure) or not(cac:TransportHandlingUnit/cac:MeasurementDimension[normalize-space(cbc:AttributeID) = 'AAB']/cbc:Measure) or (cbc:GrossWeightMeasure/@unitCode) > (cac:TransportHandlingUnit/cac:MeasurementDimension[normalize-space(cbc:AttributeID) = 'AAB']/cbc:Measure/@unitCode) or (cbc:GrossWeightMeasure/@unitCode) < (cac:TransportHandlingUnit/cac:MeasurementDimension[normalize-space(cbc:AttributeID) = 'AAB']/cbc:Measure/@unitCode) or number(cbc:GrossWeightMeasure) = sum(cac:TransportHandlingUnit/cac:MeasurementDimension[normalize-space(cbc:AttributeID) = 'AAB']/cbc:Measure)
Usage
/ ubl:DespatchAdvice / cac:Shipment / cbc:GrossWeightMeasure
/ ubl:DespatchAdvice / cac:Shipment / cac:TransportHandlingUnit / cac:MeasurementDimension / cbc:Measure