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

[V3.1] Change PathType to be of Type xs:anyURI #316

Closed
wants to merge 2 commits into from

Conversation

s-heppner
Copy link
Collaborator

@s-heppner s-heppner commented Feb 22, 2024

Previously, PathType was matched towards
RFC 8089, however this posed several problems,
such as basyx-python-sdk#72.

In aas-specs#299,
the proposed solution is to make PathType of type xs:anyURI.

Fixes #303
Fixes #330

Depends on #317

Previously, PathType was matched towards
RFC 8089, however this posed several problems,
such as [basyx-python-sdk#72](eclipse-basyx/basyx-python-sdk#72).

In [aas-specs#299](admin-shell-io/aas-specs#299),
the proposed solution is to make PathType of
type xs:anyURI.

Fixes #303
@s-heppner s-heppner added the V3.1 SpecAAS V3.1 label Feb 22, 2024
@s-heppner s-heppner added this to the V3.1 milestone Feb 22, 2024
@s-heppner s-heppner marked this pull request as draft February 22, 2024 09:43
@zrgt zrgt self-requested a review February 22, 2024 16:54
@s-heppner s-heppner changed the title V3.1: Change PathType to be of Type xs:anyURI [V3.1] Change PathType to be of Type xs:anyURI Jul 25, 2024
@s-heppner s-heppner changed the base branch from main to v3.1/main October 8, 2024 10:15
@s-heppner s-heppner marked this pull request as ready for review October 8, 2024 10:15
@s-heppner s-heppner marked this pull request as draft October 8, 2024 10:15
Previously, `matches_xs_any_URI` was actually
implemented to match any IRI.
This commit changes the implementation to match
for RFC 3986, which is the most up to date RFC
defining URI syntax.
@s-heppner
Copy link
Collaborator Author

Currently, the check is failing due to two tests:

  • assert not v3_1.matches_xs_any_URI("http://datypic.com#f% rag"): Here I'm a bit out of my depth.
  • assert not v3_1.matches_xs_any_URI("http://datypic.com#frag1#frag2"): I've scanned the RFC and could not find it stated anywhere that there is only one fragment allowed (even though it would seem sensible to me).

I'm relatively certain I used the correct URI regex (from here). Can someone help me debug this please?

@s-heppner
Copy link
Collaborator Author

s-heppner commented Oct 18, 2024

We've acidentally created quite a mess here, so I will close this PR and open new ones instead. Still let me try to document what went wrong here and what we should do instead:

  • Path_type is not technically xs:anyURI, rather it is "conforming to RFC 2396" see here.
  • matches_xs_any_uri, in this branch is implemented as RFC 3986, an RFC which specifies URI, but is not the RFC used in XSD 1.0, the XSD version used in the AAS. xs:anyURI is specified as "as defined by [RFC 2396], as amended by [RFC 2732]" see here.

Therefore, we now have two things to do:

  1. Add a matches_RFC_2396 function and use that in Path_type
  2. Adapt matches_xs_any_uri method to use RFC 2396 as ameneded by RFC 2732 (and therefore add RFC 2732 to abnf_to_regexp

@s-heppner s-heppner closed this Oct 18, 2024
@s-heppner s-heppner deleted the Fix/PathType branch October 18, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V3.1 SpecAAS V3.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapt PathType regex
1 participant