admin-shell-io / aas-test-engines

Official test tooling for the Asset Administration Shell
https://certification.admin-shell-io.com
Apache License 2.0
5 stars 2 forks source link

Resolving relationship relative to part (instead of aasx root) #14

Closed seicke closed 2 months ago

seicke commented 2 months ago

I tried to validate an aasx package, generated with aas4j: aas-gui.aasx.zip

Got the following output:

1___test_aas-gui___output

Structure of aasx package aas-gui.aasx:

aas-gui.aasx
├── _rels
├── aasx
│   ├── _rels
│   │   └── aasx-origin.rels
│   ├── xml
│   │   ├── _rels
│   │   │   └── context.xml.rels
│   │   └── content.xml
│   └── aasx-origin
├── docProps
│   └── core.xml
├── files
│   └── test.pdf
└── [Content_Types].xml

Content of aasx/_rels/aasx-origin.rels with the named relationship "xml/content.xml":

<?xml-version="1.0" encoding="UTF-8" standalone="yes"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
    <Relationship Id="afb4e4cfb-287e-4b09-b505-ca8c501aa86b" Target="xml/content xml" Type="http://admin-shell.io/aasx/relationships/aas-spec"/>
</Relationships>

It seems that the validation tool only resolve relationships relative to the AASX root (and not relative to parts, in this case "aasx")

This issue is related/comparable to https://github.com/admin-shell-io/aasx-package-explorer/issues/654

otto-ifak commented 2 months ago

Hello @seicke and thanks for reporting this. We fixed your issue with 551f7e4dc55800a66c1ed7a9fb2cb0166362ef4d

However, you aasx file is still rejected. Do you expect it to be compliant to v3.0 of the meta model?

seicke commented 2 months ago

Hello @otto-ifak, thanks for your quick response and for fixing!

Handling of relative paths is working now, thanks again!

PS: I did not expect that the AASX is compliant to v3.0, I expected a rejection (but not caused by relative paths 😃)