- From: Markus Lanthaler <markus.lanthaler@gmx.net>
- Date: Wed, 12 Nov 2014 23:23:31 +0100
- To: <public-linked-json@w3.org>
Hi Sean, On Wednesday, November 12, 2014 3:19 PM, Sean Johnson wrote: > In case you can't tell from my prior unanswered question ( > http://lists.w3.org/Archives/Public/public-linked-json/2014Nov/0004.html Sorry, I guess most of us are very busy at the moment.. I'll have a look at that mail right after finishing answering this one :-) > ) I'm in the middle of a new JSON-LD processor implementation. Cool. Which language will the processor be written in? Do you plan to open-source it? > I have another question, this one about 3.4.4 of the Context Processing > Algorithm ( > http://www.w3.org/TR/json-ld-api/#context-processing-algorithm ). It > says: > > 3.4.4) Otherwise, if value is a relative IRI and the base IRI of result > is not null, set the base IRI of result to the result of resolving value > against the current base IRI of result. > > My question is, what does "resolving" mean in that sentence? It means you need to run the algorithm specified in section 5.2 of RFC3986 [1]. This is explained in step 3.2.1 of the context processing algorithm. > We could have an @base in the result of "http://cnn.com/" for example. > What should happen when the local context(s) provide relative @base > IRI's of: > > 1) "/foo/bar" It gets resolved to http://cnn.com/foo/bar > 2) "foo/bar" and then "blat/bloo" First to http://cnn.com/foo/bar and then http://cnn.com/foo/blat/bloo This is exactly the same thing that happens in HTML documents for instance. All the details can be found in RFC3986 [1] > Is #1 above a valid relative IRI? If so, is the new @base of result Yes > "http://cnn.com/foo/bar" or "http://cnn.com//foo/bar"? The former > For #2 where we have multiple local contexts to process, does this end > up with the final @base in result as ""http://cnn.com/foo/barblat/bloo"? No, see above. This is not string concatenation but URI resolution. > Just looking for some definition of "resolving" in this (unusually) > vague portion of the otherwise clear spec. Hope this helps > Oh… and if you're so inclined to weigh in on value expansion… I'd be > much obliged: > http://lists.w3.org/Archives/Public/public-linked-json/2014Nov/0004.html Will do in a minute Cheers, Markus [1] http://tools.ietf.org/html/rfc3986#section-5.2 -- Markus Lanthaler @markuslanthaler
Received on Wednesday, 12 November 2014 22:24:04 UTC