- From: Markus Lanthaler <markus.lanthaler@gmx.net>
- Date: Mon, 4 Aug 2014 21:53:41 +0200
- To: "'JSON-LD'" <public-linked-json@w3.org>
On 4 Aug 2014 at 21:40, Gregg Kellogg wrote: > On Aug 4, 2014, at 11:01 AM, Sebastian Heath wrote: >> I'd like to use a relative URI in @context. As in, >> >> { >> "@context": "context.jsonld", >> "@graph": [ ... rest of the jsonld ... ] >> } [...] > So, in this case, "context.jsonld" is resolved relative to the BASE IRI of the > document containing it. > >> When I use the jsonld command line tool from the node package I get >> >> 'jsonld.NormalizeError: Could not convert input to RDF dataset before >> normalization.' >> >> The file is otherwise valid JSON and it works when I stick in a >> fully-qualified IRI. > > As you can see, the problem is that when using a command line tool, the > document has no BASE IRI. It may be that the tool gives you the option > of establishing one. I personally would consider this to be a bug in jsonld.js' CLI tool. I think it should establish the base IRI of the document itself instead of having to do it explicitly as Gregg described: > jsonld --uri 'file:/"`pwd` input.jsonld Dave? -- Markus Lanthaler @markuslanthaler
Received on Monday, 4 August 2014 19:54:12 UTC