w3c / json-ld-syntax

JSON-LD 1.1 Specification
https://w3c.github.io/json-ld-syntax/
Other
112 stars 22 forks source link

Example 16 - navigation unclear #273

Closed hrennau closed 4 years ago

hrennau commented 4 years ago

In example 16 an object resource has the IRI https://greggkellogg.net/foaf#me. Note the fragment identifier.

Explanatory text: "... a document residing at http://manu.sporny.org/about may contain the example above, and reference another document at https://greggkellogg.net/foaf which could include a similar representation."

But if the other document really has the same structure as the document shown, successful navigation would require the use of a modified IRI (with fragment identifier removed). So the resource identifying IRI may not be used (without modification) as resource locating IRI (URL).

Mapping the IRI identification to navigation appears to me an important aspect of dealing with Linked Data. Therefore a remark about the difference between identifying and locating would in my opinion improve the paragraph titled "Referencing objects".

pchampin commented 4 years ago

successful navigation would require the use of a modified IRI (with fragment identifier removed)

You are right, but this is a built-in feature of IRIs (or URLs for that matter). When derefencing an IRI, a client is expected to remove the fragment part. So https://greggkellogg.net/foaf#me identifies a Person, but dereferencing it amounts to dereference https://greggkellogg.net/foaf, which identifies and locates a Document (describing both itself and the person).

Note that this specific handling of fragment identifiers is not JSON-LD specific (for example, this is what your browser does with any "internal" link: it retrieves the whole document from the server, and handles the anchor on its own). This is why it was not explained in more detail in this example.

But maybe it should?...

gkellogg commented 4 years ago

WG resolved to close the issue as complete.