You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a v3.0 aasx file with Package Explorer the output xml may contain self closing tags as is the case in the following snippet: <semanticId> <type>ExternalReference</type> <keys /> </semanticId>
The empty <keys /> tag leads to deserialization failure in the XMLDeserialzer read method.
The same applies for self closing <outputVariables/> , <inoutputVariables /> or <multiLanguageProperty><value /></multiLanguageProperty> tags.
A check for null may be sufficient as in the EmbeddedDataSpecificationsDeserializer deserialize method. A self cosing <embeddedDataSpecifications /> tag doesn't lead to deserialization failure.
If the self closing <!-- keys /--> tag is commented out the deserialization doesn't fail, although the reference is invalid according to the specification because it doesn't contain any <key>.
A sensible exception or a warning would be helpful.
Attached is a v2.0 zip file which after renaming to .aasx and saving in Package Explorer lead to a deserialization failure when read with AASXDeserializer.java. DrillerInstance - Instance.zip
The text was updated successfully, but these errors were encountered:
If the <!-- keys /--> tag is commented out the deserialization doesn't fail any more. According to the specification however a reference without a <key> is not valid.
Please see #172.
To summarize, this is an issue with the AASX Package Explorer not creating spec conforming AASX files. Feel free to create an issue in the AASX Package Explorer repository.
But shouldn't the import / reader race at least a warning, that there are invalid SemanticIds included in the imported aasx?
As @msiebert-dev wrote, if keys are not present, then the importer would import an invalid reference...
...only with type, but without keys.
Or should we afterwards execute an explicit validation?
msiebert-dev
changed the title
Deserialization fails if aasx XML contains empty <keys />
Throw sensible exception in case of deserialization error or output warning
Sep 19, 2023
When creating a v3.0 aasx file with Package Explorer the output xml may contain self closing tags as is the case in the following snippet:
<semanticId> <type>ExternalReference</type> <keys /> </semanticId>
The empty
<keys />
tag leads to deserialization failure in the XMLDeserialzer read method.The same applies for self closing
<outputVariables/>
,<inoutputVariables />
or<multiLanguageProperty><value /></multiLanguageProperty>
tags.A check for
null
may be sufficient as in the EmbeddedDataSpecificationsDeserializer deserialize method. A self cosing<embeddedDataSpecifications />
tag doesn't lead to deserialization failure.If the self closing
<!-- keys /-->
tag is commented out the deserialization doesn't fail, although the reference is invalid according to the specification because it doesn't contain any<key>
.A sensible exception or a warning would be helpful.
Attached is a v2.0 zip file which after renaming to .aasx and saving in Package Explorer lead to a deserialization failure when read with AASXDeserializer.java.
DrillerInstance - Instance.zip
The text was updated successfully, but these errors were encountered: