Summary
Severity: High
File: sdk/basyx/aas/adapter/xml/xml_deserialization.py:1156-1158
Description
value and value_format are independent optional fields in AAS v3.0.1, but the XML deserializer treats them as coupled: value is only set when value_format is also present.
value = _get_text_or_none(element.find(NS_AAS + "value"))
if value is not None and value_format is not None: # BUG: should be independent
ds_iec.value = value
An element with value but no value_format has its value silently dropped during XML deserialization. The JSON deserialization at json_deserialization.py:512-513 correctly sets them independently.
Fix
Split into two independent conditions:
if value is not None:
ds_iec.value = value
if value_format is not None:
ds_iec.value_format = value_format
Summary
Severity: High
File:
sdk/basyx/aas/adapter/xml/xml_deserialization.py:1156-1158Description
valueandvalue_formatare independent optional fields in AAS v3.0.1, but the XML deserializer treats them as coupled:valueis only set whenvalue_formatis also present.An element with
valuebut novalue_formathas itsvaluesilently dropped during XML deserialization. The JSON deserialization atjson_deserialization.py:512-513correctly sets them independently.Fix
Split into two independent conditions: