BR-FXEXT-BR-54-2
Each Item attribute (BG-32) shall contain an Item attribute value (BT-161) or an Item attribute value with unit of measure (BT-X-12, with BT-X-12-0), but noth both.
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element
//ram:ApplicableProductCharacteristic
(exists(ram:Value) and not(exists(ram:ValueMeasure))) or (not(exists(ram:Value)) and (exists(ram:ValueMeasure[@unitCode!=''])))
Checked with France Factur-X EXTENDED, Factur-X / ZUGFeRD EXTENDED