Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] CLI aasx Generation - use absolute paths and valid relationship IDs #488

Closed
BirgitBoss opened this issue Dec 4, 2023 · 7 comments
Closed
Labels
aas acknowledged Has been viewed by one of the maintainers and is ready for further work, discussion or other steps. bug Something isn't working

Comments

@BirgitBoss
Copy link
Contributor

BirgitBoss commented Dec 4, 2023

Status: The currently generated .aasx files cannot be imported into the aasx package explorer.

Changes reconsidered after update of AASX Package Explorer

1) NOT VALID ANY LONGER- Explorer will support relative Paths
Instead of using relative path use absolute path in aasx-origin.rels and .rels

  • in aasx-origin.rels change from xml/content.xml to /aasx/xml/content.xml
  • in .rels from docProps/core.xml to /aasx/docProps/core.xml
  • in .rels from aasx/aasx-origin to /aasx/aasx-origin

2) Relationship IDs shall not start with a number, no valid ID

  • in .rels and aasx-original.rels add a char as first symbol in ID

example: instead of
<Relationship Id="3d013462-90d0-4db7-83b6-22c8276db865" Target="aasx/aasx-origin" Type="http://www.admin-shell.io/aasx/relationships/aasx-origin"/>
use
<Relationship Id="A3d013462-90d0-4db7-83b6-22c8276db865" Target="aasx/aasx-origin" Type="http://www.admin-shell.io/aasx/relationships/aasx-origin"/>

3) www.admin-shell.io
in aasx-origin.rels and .rels
the newest version of the CLI aasx generator writes http://admin-shell.io/aasx/relationships/aasx-origin instead of http://www.admin-shell.io/aasx/relationships/aasx-origin: add "www" before admin-shell.io
same for http://admin-shell.io/aasx/relationships/aas-spec
The AAS specification Part 5 requests path without "www": https://github.com/admin-shell-io/temp-aasx-package-explorer/issues/124 still needs to be fixed in the aasx package explorer itself. There is an issue for Part 5 to support both path.

@BirgitBoss
Copy link
Contributor Author

In admin-shell-io/aasx-package-explorer#432 only bugs with respect to xml file and import of xml were checked. In this issue aasx package format errors or at least issues hindering the import into the aasx package explorer are identified.

@BirgitBoss
Copy link
Contributor Author

BirgitBoss commented Dec 4, 2023

compare also to admin-shell-io/aasx-package-explorer#654 discussing the issue with the leading slash

and eclipse-aas4j/aas4j#181 discussing the issue with relationship IDs

Seems to be related to more general issue of importing aasx in the explorer: eclipse-aas4j/aas4j#158 so it might be that aas4j needs to fix this issue first.

@FrankSchnicke
Copy link

This is not a bug in AAS4J but in the AASX Package Explorer, see admin-shell-io/aasx-package-explorer#654

@BirgitBoss
Copy link
Contributor Author

I do not agree, see my comment in admin-shell-io/aasx-package-explorer#654 (comment):

"In Part 5 Chapter 5.4 File Name Conventions it is stated that /aasx/ shall be the common prefix for all files containing aasx package specific information. So relative paths seem not be conformant to the specification Part 5 V3.0."

@FrankSchnicke
Copy link

Please see my response on admin-shell-io/aasx-package-explorer#654

@FrankSchnicke
Copy link

  1. Relationship IDs shall not start with a number, no valid ID

This is now fixed in the latest release of AAS4J (aas4j-1.0.0-RC1). (cf. eclipse-aas4j/aas4j#181)

@atextor
Copy link
Contributor

atextor commented Feb 23, 2024

With the update to AAS4J 1.0.0, esmf-sdk and samm-cli incorporate the AAS4J fix (eclipse-aas4j/aas4j#181). Starting with the upcoming version 2.6.0 of esmf-sdk and samm-cli, generated .aasx files will use valid relationship IDs.

The AASX Package Explorer contains a loading fix; in order to load .aasx generated by esmf-sdk/samm-cli an AASPE version released after 2024-02-07 is therefore required (at the time of this writing, there is no release yet, but it works with nightly builds such as this one).

@atextor atextor closed this as completed Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aas acknowledged Has been viewed by one of the maintainers and is ready for further work, discussion or other steps. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants