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

GH-135: Follow URI scheme rules #136

Merged
merged 3 commits into from
Jan 29, 2025
Merged

GH-135: Follow URI scheme rules #136

merged 3 commits into from
Jan 29, 2025

Conversation

afs
Copy link
Contributor

@afs afs commented Jan 17, 2025

This closes #135.

This PR is close to the changes in #131 and #132 and will probably need adjusting after they are merged.


Preview | Diff

@afs afs requested review from gkellogg and pchampin January 17, 2025 10:40
spec/index.html Outdated Show resolved Hide resolved
Copy link
Member

@gkellogg gkellogg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m a bit concerned about saying that special rules without listing other important schemes, as this will lead to interoperability issues.

@afs
Copy link
Contributor Author

afs commented Jan 17, 2025

I’m a bit concerned about saying that special rules without listing other important schemes, as this will lead to interoperability issues.

Which schemes did you have in mind? I picked HTTP (important) and DID (W3C) for the note.

URNs are complicated (there are rules per namespace).

file:///, even with RFC8089, are not global.

Some schemes don't exist! uuid:, oid: (properly, use the urn:uuid:, urn:oid: forms).

@gkellogg
Copy link
Member

I’m a bit concerned about saying that special rules without listing other important schemes, as this will lead to interoperability issues.

Which schemes did you have in mind? I picked HTTP (important) and DID (W3C) for the note.

those certainly make sense given the context, but we make a broad statement that could include obscure schemes, or those yet to be released. White-listing specific schemes (http, https, and did, roof example) would enhance interoperability.

@afs
Copy link
Contributor Author

afs commented Jan 17, 2025

White-listing specific schemes

Is the note text enough?
Or maybe move it up the list of points in the note?
Or change

IRIs SHOULD follow rules defined by the IRI scheme, such as those for HTTP/HTTPS [RFC7230].

URI Schemes: Examples of scheme-specific rules include the scheme rules for HTTP and the DID syntax.

I have changed it to "HTTP/HTTPS"

An advice paragraph somewhere to use specific schemes might be nice (but outside this PR).

Aside: ReSpec has not used the more usual RFC reference -- https://datatracker.ietf.org/doc/html/rfc7230.

@pchampin
Copy link
Contributor

I think @gkellogg 's concern could be addressed in the note, by rephrasing it:

URI Schemes: Implementations may ignore URI schemes that they do not recognized, but are encouraged to enforce the scheme-specific rules of the most common ones, such as scheme rules for HTTP/HTTPS and the DID syntax.

@gkellogg
Copy link
Member

I think @pchampin’s suggested wording is okay. The SHOULD makes testing a bit challenging, though. Typically, we do not test SHOULD/MAY behavior.

@afs
Copy link
Contributor Author

afs commented Jan 18, 2025

Note updated.

If they don't recognize a scheme, it isn't an option to ignore - they must!

For the testing, my ideal is having rdf-tests as a record of community practice with an emphasis on common practice to warn about.

"SHOULD" is there because (1) this is new, not in RDF 1.1 (2) the "rules" aren't always cut-and-dried.

@afs
Copy link
Contributor Author

afs commented Jan 18, 2025

I will squash the PR to one commit before merge; for now, the PR is keeping each change as a commit.

@afs afs requested a review from pchampin January 18, 2025 10:04
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Outdated Show resolved Hide resolved
spec/index.html Show resolved Hide resolved
@afs afs self-assigned this Jan 23, 2025
spec/index.html Outdated Show resolved Hide resolved
@afs
Copy link
Contributor Author

afs commented Jan 28, 2025

@pchampin This is waiting on your approval. The duplicated text has been fixed.

@afs afs merged commit 211bafc into main Jan 29, 2025
2 checks passed
@afs afs deleted the iri-schemes branch January 29, 2025 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add text noting that IRIs schemes have scheme-specific rules
5 participants