aas-core-works / aas-core-meta

Provide formalized meta-models for Asset Administration Shell (AAS).
Other
9 stars 3 forks source link

Inconsistency to specification at `matches_RFC_8089_path` #269

Closed s-heppner closed 7 months ago

s-heppner commented 1 year ago

The function matches_RFC_8089_path is supposed to check for a valid path URI.

Nevertheless, it does not allow for relative paths, which are necessary to reference supplementary files in AASX-packages: PathType definition AASX-Specification for Supplementary Files

Therefore, it is absolutely necessary to allow for relative paths in Path_type.

mristin commented 1 year ago

The relative paths in RFC 8089 start with a dot, IIRC. The pattern has been automatically translated from ABNF in the RFC document.

edit: added "IIRC" for uncertainty

s-heppner commented 1 year ago

Alright, then I assume the problem lies with the outdated version of our AASX-Writer. I'll double check this.

mristin commented 1 year ago

See also: https://stackoverflow.com/a/70031934, but this does not seem like a very reliable source.

mristin commented 1 year ago

Also this: https://superuser.com/a/1763925

It does seem plausible that RFC 8089 does not allow relative paths at all.

s-heppner commented 1 year ago

The specification about PathType:

Note: for any string conformant to RFC8089, the "file" URI scheme (for relative and absolute file paths) applies.

I've tried checking RFC 8089 more extensively and this is the only mention I found of relative paths:

 base URI:   file:///c:/path/to/file.txt
 rel. ref.:  /some/other/thing.bmp
 resolved:   file:///c:/some/other/thing.bmp

 base URI:   file:///c:/foo.txt
 rel. ref.:  ../bar.txt
 resolved:   file:///c:/bar.txt

The relative paths seem not to be part of the formal specification, their existence relative to a base RFC 8089 URI does seem to be acknowledged, though.

Nevertheless, let's read the PathType definition again: It does not enforce the use of only RFC 8089 paths! Therefore, my suggestion would be to ammend the matches_RFC_8089_path with relative paths (and possibly rename it to matches_path_type. However, I will bring the problem forward with the WS.

mristin commented 1 year ago

I'll close the issue as it seems resolved. Please feel free to re-open.

mristin commented 1 year ago

@s-heppner This issue pops up again and again. Are there any news from the AAS WS? Are RFC 8089 enforced in V3 or not?

s-heppner commented 1 year ago

Let's talk about this in person when we next speak

mristin commented 7 months ago

As far as I know, this issue will be fixed in V3.1, but no changes in V3 are expected. I'm closing the issue as it is not related to V3, and we will consider it anyhow when we formalize V3.1.