- From: Stian Soiland-Reyes <soiland-reyes@cs.manchester.ac.uk>
- Date: Thu, 30 Jul 2015 10:16:37 +0100
- To: Benjamin Young <bigbluehat@hypothes.is>
- Cc: Rob Sanderson via GitHub <sysbot+gh@w3.org>, W3C Public Annotation List <public-annotation@w3.org>
You are right, the @base must be inside the @context - so to avoid full URIs in the JSON-LD you would have to use the verbose { "@context": [ {"@base": "http://example.com"}, "http://www.w3.org/ns/oa/context?" ] "..": "..." } Perhaps simpler is to use full URIs in the Turtle. People who know Turtle will know how to make relative URIs - while people who are a bit fresh will still see it at a more standard 'triple level'. This should somewhat discourage people from accidentally making URIs that don't resolve. (Why is the oa @context missing from the JSON-LD example? Have we decided on a URI yet?) Rant time about JSON-LD @context: -- we had several discussions in JSON-LD community about this.. in early draft you could inherit a @base from an external @context - but we changed our mind as that sounded quite confusing and dangerous, and raised lots of scary issues with multiple contexts. In one evil version you could do an external context that defined { "@base": "../" } (I actually wanted to do this! :)) and which would be resolved by the location of the document (e.g. file:///something/something.jsonld ) rather than from the external context's URI. But that is just too far away from how relative IRIs are resolved per document on the rest of the web - and hence the @base inheritance was removed, and a stronger requirement for absolute URIs in @base and @vocab was added. On 29 July 2015 at 16:21, Benjamin Young <bigbluehat@hypothes.is> wrote: > Yeah. Think that should. > > I'd wondered about doing the same for the JSON-LD examples, but it's some > pretty heavy cruft because `@base` isn't top level (afaik), so it ends up > looking like: > ```json > { > "@context": { > "@base": "http://example.com/" > } > } > ``` > http://www.w3.org/TR/json-ld/#base-iri > > Also... >> Please note that the @base will be ignored if used in external contexts. > > Which is kind of sad...but also makes sense. -- Stian Soiland-Reyes, eScience Lab School of Computer Science The University of Manchester http://soiland-reyes.com/stian/work/ http://orcid.org/0000-0001-9842-9718
Received on Thursday, 30 July 2015 09:17:26 UTC