-
Notifications
You must be signed in to change notification settings - Fork 157
Define when an IRI is considered to be absolute and if IRI normalization is supported #46
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
Comments
This is redundant now, as the spec only allows absolute IRIs. |
The spec supports relative IRIs, absolute IRIs, and prefixes: |
Definitions of absolute and relative IRIs added to commit ae24034. |
This defines what an absolute IRI is but not necessarily how we recognize one. Should we have something like:
|
The problem is, it is very difficult to distinguish an IRI from a compact IRI (CURIE). As mentioned on the call, one way is to limit the value space of the suffix portion to exclude values that begin with '//', but this is not fool-proof, as there are IRI schemes that do not need to begin with '//', such as 'mailto'. The proposed updated CURIE grammar for RDFa is the following:
We could consider the reference portion for the definition of suffix in JSON-LD, but I think we agreed on today's telecon that this was premature. Practically speaking, in JSON-LD, a CURIE is recognized when the prefix is defined as a term in the active context, and otherwise, the value is treated as an absolute IRI. I propose that we add this definition and resolve the issue. |
In other words you would propose that if a term contains a colon but the prefix isn't defined it is treated as an absolute IRI, right? |
Yes, I believe that's what I just said. |
OK.. that would basically that all terms with colons would result in an IRI but probably there's no other technical solution without relying on a list of allowed schemas. |
PROPOSAL: If a key in a JSON-LD document contains a colon, it is a CompactIRI if the prefix is defined as a term in the active context, otherwise it is an AbsoluteIRI. |
+1 If we are going to define it that way we need to add a note in the spec saying that keys with colons are ALWAYS mapped to an IRI - there's no way around this. The only thing we could do is to specify an escape character (which could also work with the @ keywords)... but I don't know if we really need to go that far. |
RESOLVED: If a key in a JSON-LD document contains a colon and the first colon is not followed by "//", it is a CompactIRI if the prefix is defined as a term in the active context, otherwise it is an AbsoluteIRI. |
We still have to define how we detect whether an IRI is an absolute IRI or not (this should be easy as we just have to look for a colon and an undefined prefix). We also have to define whether we allow stuff like "../" and "./" in relative IRIs and suffixes. Doing so would require IRI normalization and would go beyond pure textual concatenation.
The text was updated successfully, but these errors were encountered: