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

How fragment identifiers are interpreted (IANA considerations) #107

Closed
lanthaler opened this issue Apr 24, 2012 · 6 comments
Closed

How fragment identifiers are interpreted (IANA considerations) #107

lanthaler opened this issue Apr 24, 2012 · 6 comments

Comments

@lanthaler
Copy link
Member

@lanthaler lanthaler commented Apr 24, 2012

How are fragment identifiers in JSON-LD interpreted. We might need to specify this for the IANA registration.

@msporny
Copy link
Member

@msporny msporny commented Apr 29, 2012

To make this a bit more clear, I think what we're discussing here is that this:

http://example.com/data/foo.jsonld#bar

means that the fragment "#bar" points to a subject in the document that is "http://example.com/data/foo.jsonld#bar", right? In that case, I think the proposal is fairly simple:

PROPOSAL: Fragment identifiers associated with JSON-LD documents identify a subject that is contained in the document. If the document contains multiple graphs, the fragment identifier is a pointer to the first JSON object containing the @id reference to the subject in the document.

Note that we can't say anything else about how IRIs containing fragment identifiers are interpreted inside of JSON-LD documents - those values are opaque to JSON-LD since the meaning of the fragment identifier can change based on the MIME type being used for retrieval.

@lanthaler
Copy link
Member Author

@lanthaler lanthaler commented Apr 29, 2012

I don't really understand what you are proposing here. Can you explain it in terms of what happens in an application!?

@gkellogg
Copy link
Member

@gkellogg gkellogg commented Apr 30, 2012

The notion of "first JSON object" may be complicated, if they're contained as property values, which are inherently unordered. Also, it's not really a matter of containing multiple graphs, as this could be the case with a single default graph as well. Note that in Turtle or RDFa documents, there may be more than one subject definition identified with the same fragment, and the meaning is not that of the first, but of all subjects having that fragid on the base IRI.

<#me> :knows <#you> .
<#you> :knows <#me> .
<#me> :name "Gregg" .

I would say that fragment identifiers identify zero or more subject definitions contained within the document. We should probably use text similar to that in RDFa 1.1 Core:

In some of the examples below we have used IRIs with fragment identifiers that are local to the document containing the RDFa fragment identifiers shown (e.g., 'about="#me"'). This idiom, which is also used in RDF/XML [RDF-SYNTAX-GRAMMAR] and other RDF serializations, gives a simple way to 'mint' new IRIs for entities described by RDFa and therefore contributes considerably to the expressive power of RDFa. The precise meaning of IRIs which include fragment identifiers when they appear in RDF graphs is given in Section 7 of [RDF-CONCEPTS].

Although, this should be re-worded to be less specific about RDF, and indicate that the interpretation of subject identifiers is equivalent to that from RDF-CONCEPTS.

@lanthaler
Copy link
Member Author

@lanthaler lanthaler commented May 1, 2012

PROPOSAL: In JSON-LD a fragment identifier MAY identify a node in the linked data graph expressed in the document.
This idiom, which is also used in RDF [RDF-CONCEPTS], gives a simple way to "mint" new, document-local IRIs to label nodes and therefore contributes considerably to the expressive power of JSON-LD.

Still a bit clumsy but I think it contains all the necessary information. Not sure if we really need to reference RDF here though.

@lanthaler
Copy link
Member Author

@lanthaler lanthaler commented May 1, 2012

RESOLVED: In JSON-LD a fragment identifier MAY identify a node in the linked data graph expressed in the document. This idiom, which is also used in RDF [RDF-CONCEPTS], gives a simple way to "mint" new, document-local IRIs to label nodes and therefore contributes considerably to the expressive power of JSON-LD.

@lanthaler
Copy link
Member Author

@lanthaler lanthaler commented May 1, 2012

NOTE: The group has discussed what graphical clients should do when given a JSON-LD fragment identifier and have come to the following conclusion: If an implementer is developing a client to view JSON-LD markup and wants to implement a feature for navigating to a fragment identifier in a JSON-LD document, the client software should navigate to the first definition of the fragment identifier in the JSON-LD document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants