From c381419abb822394f0615894d7c2c9d72cb261e0 Mon Sep 17 00:00:00 2001 From: Andy Seaborne Date: Fri, 17 Jan 2025 10:37:44 +0000 Subject: [PATCH 1/3] GH-135: Follow URI scheme rules --- spec/index.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spec/index.html b/spec/index.html index 004185e..bc937ea 100644 --- a/spec/index.html +++ b/spec/index.html @@ -589,8 +589,9 @@

IRIs

defined in RFC 3987 [[!RFC3987]].

IRIs in the RDF abstract syntax MUST be resolved - per [[RFC3986]], - and MAY contain a fragment identifier.

+ per [[RFC3986]], and MAY contain a fragment identifier. IRIs SHOULD + follow rules defined by the IRI scheme. +

IRI equality: Two IRIs are the same if and only if they consist of the same sequence of @@ -644,6 +645,11 @@

IRIs

if a base IRI can be established [[RFC3986]].

+

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

+

IRI normalization: Interoperability problems can be avoided by minting only IRIs that are normalized according to From 9eff5b3b90b2d2ff858fe2a26177b43fcb3f2de1 Mon Sep 17 00:00:00 2001 From: Andy Seaborne Date: Fri, 17 Jan 2025 17:49:53 +0000 Subject: [PATCH 2/3] Add that IRIs must not be relative references --- spec/index.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/index.html b/spec/index.html index bc937ea..12b4cf6 100644 --- a/spec/index.html +++ b/spec/index.html @@ -591,6 +591,15 @@

IRIs

IRIs in the RDF abstract syntax MUST be resolved per [[RFC3986]], and MAY contain a fragment identifier. IRIs SHOULD follow rules defined by the IRI scheme. + +

For convenience, a complete [[ABNF]] grammar + from [[RFC3987]] is provided in .

+ +

IRIs in the RDF abstract syntax + MUST be resolved per [[RFC3986]] and + MUST NOT be relative references. + They MAY contain a fragment identifier. + IRIs SHOULD follow rules defined by the IRI scheme.

IRI equality: From 8225f187234f4af62b9b34158470950257681b4a Mon Sep 17 00:00:00 2001 From: Andy Seaborne Date: Sat, 18 Jan 2025 10:03:31 +0000 Subject: [PATCH 3/3] Update note from review comments --- spec/index.html | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/spec/index.html b/spec/index.html index 12b4cf6..706a965 100644 --- a/spec/index.html +++ b/spec/index.html @@ -588,18 +588,11 @@

IRIs

is a string that conforms to the syntax defined in RFC 3987 [[!RFC3987]].

-

IRIs in the RDF abstract syntax MUST be resolved - per [[RFC3986]], and MAY contain a fragment identifier. IRIs SHOULD - follow rules defined by the IRI scheme. - -

For convenience, a complete [[ABNF]] grammar - from [[RFC3987]] is provided in .

- -

IRIs in the RDF abstract syntax +

An IRI in the RDF abstract syntax MUST be resolved per [[RFC3986]] and - MUST NOT be relative references. - They MAY contain a fragment identifier. - IRIs SHOULD follow rules defined by the IRI scheme. + MUST NOT be a relative reference. + An IRI MAY contain a fragment identifier. + An IRI SHOULD follow rules defined by the IRI scheme.

IRI equality: @@ -654,9 +647,13 @@

IRIs

if a base IRI can be established [[RFC3986]].

-

URI Schemes: Examples of scheme-specific rules include the - scheme rules for HTTP and the +

URI Schemes: + Implementations are encouraged to enforce the scheme-specific rules of + the common schemes, such as the + scheme rules for HTTP/HTTPS and the DID syntax. + Implementations ignore URI scheme rules + for schemes they do not recognize.

IRI normalization: