Description
This issue was first raised in a comment to #133, which was unfortunately not located on the right lines of the patch. It should have been about line 5833.
To summarize, PR #133 states that, when dereferencing a URL to a non JSON-LD content, a JSON-LD must follow a Link HTTP header with rel="alternate" and type="application/ld+json", if available. This is perceived as some kind of "client-side content management", and I am very happy with it.
My concern is about line 5833, which states that the processor must then behave as if the target of the Link had been directly retrieved from the original URL (i.e. the source of the Link).
So if I get text/html from http://example.org/
, with a Link to https://example.org/data/context.jsonld
, and the latter contains "@id": "#foo"
, this should be interpreter as http://example.org/#foo
, rather than https://example.org/data/context.jsonld#foo
.
If that was transparent content-negogication (i.e. the client never explicitly fetches the second URL), then that would be ok. But as there is an explicit fetch of the second URL, this is more akin to 303 redirect, or more precisely, to content-negociation + 303 redirect as used by many RDF sources (such as DBPedia) and described by Jeni Tennison.
And as far as I can tell, there is no precedent where relative IRIs after a redirect are interpreted with the base of the source (i.e. as if the redirect had not happened). While I see how it makes sense from the point of view of semantics, I'm concerned that this would make JSON-LD processors behave differently from other HTTP clients.