A tool to fix namespace issues in AASX files.
This tool becomes obsolete when Bug #666 and Bug 681 are fixed and AASX Package Explorer produces standard compliant files.
This tool can fix the namespace problems of certain versions of AASX Package Explorer (e.g. v2023-11-17), documented in Bug #666.
This tool can also repair submodel references and change them from ExternalReference to ModelReference, documented in Bug 681. This will only be done if a submodel with the same ID can be found in the AASX file, so we can safely assume that it's referring to this submodel.
After applying the fix (--fix
), the AASX file should be standard compliant and work with libraries such as the Basyx Python SDK. After un-applying the fix (--unfix
), the AASX file should be compatible with AASX Package Explorer again.
Usage: AASFix <input_file> <output_file> --fix|--unfix
The AASX specification states on page 17 that the namespace for relations is the following: http://admin-shell.io/aasx/relationships.
In consequence, the relationship type in .rels
files has to be http://admin-shell.io/aasx/relationships.
For example, the relationship type in _rels/.rels
has to be http://admin-shell.io/aasx/relationships/aasx-origin.
However, both the AASX Package Explorer and AAS4J use http://www.admin-shell.io/aasx/relationships as a namespace (note the extra "www").
As a result, the AASX files created by the AASX Package Explorer and AAS4J do not conform to the AASX spec on a structural level. On the other hand, the basyx-python-sdk conforms to the AASX spec and uses the correct namespace.
This issue leads to the problem that AASX files generated by the AASX Package Explorer can't be opened with the basyx-python-sdk.
Additionally, AASX files created by the basyx-python-sdk can't be opened with the AASX Package Explorer.
When a new submodel is created in Package Explorer, the submodel is referenced using an ExternalReference.
<submodels>
<reference>
<type>ExternalReference</type>
<keys>
<key>
<type>Submodel</type>
<value>https://example.com/ids/sm/0563_3130_1042_7868</value>
</key>
</keys>
</reference>
</submodels>
Since the submodel is part of the same AAS file, it should be a ModelReference instead.
As far as we know, this can't be changed within Package Explorer at the moment.