-
Notifications
You must be signed in to change notification settings - Fork 157
Relative IRIs may clash with terms #49
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
I don't think option 1 is not viable since often it's difficult for a service to figure out its base IRI. E.g. this would make serving a collection of JSON-LD documents over CDN impossible. Option 2 seems to be a good idea as because it makes the intent very clear. I, e.g., would have classified the above example as correct - I would have seen that as my intent. But that's probably just because of the strange value "homepage". Option 3 could work but, as you said, is problematic. So summarized I tend to support option 2. Relative IRIs seem to be problematic also in another instance, see issue #56. Option 2 could solve this problem as well I think. The only open problem would then be a the use of an unspecified prefix which would be interpreted as a schema, but I can't see anything we could do about that. Btw, I think misread the URI spec - if I'm not completely off: relative-ref = relative-part ... So it can start with any character. The first segment just can't contain a colon.
|
+1 for option 2. |
Issue #46 might be related to this, especially the need for IRI normalization. |
RESOLVED: The lexical space for keys in JSON-LD key-value statements is if a term: NCName, if a prefix: NCName for the prefix, otherwise the lexical space for an IRI. RESOLVED: The lexical space for keys in JSON-LD Context key-value statements is if a term: NCName, if a prefix: NCName for the prefix, otherwise the lexical space for an absolute IRI. |
Add requirements that keys expand to absolute IRIs to be processed. (It's an open issue of what to do with the value of keys that do not expand to absolute IRIs). This partially addresses issue #49 and the resolution of 1/24/2012 http://json-ld.org/minutes/2012-01-24/#resolution-1
Also completed in d3c4996. |
Altough we've removed
@base
, the issue remains where relative IRIs (who seem to be still supported) and terms may clash. For instance, consider this data (assuming it is located at http://example.org/):Currently, the triple for this data would become:
Not the intended:
This is because the
@id
given forhomepage
would be found among the terms and not be resolved against "http://example.org/".There are various ways of resolving this:
@id
(including for coerced values). That's problematic since there are many needs for these, both in contexts and in certain instance data cases for referencing e.g. classes and properties (and as@type
is basically defined as{"@id": "rdf:type", "@type": "@id"}
). We could have two different keywords, one for taking TERMorCURIEorAbsIRI values (mainly used in coercion, possibly named@term
), and one for only IRIs or perhaps CURIEorIRI. (See RDFa 1.1 for the definitions of these.)The text was updated successfully, but these errors were encountered: