Re: @base and @prefix processing

On Thu, Aug 4, 2011 at 1:33 PM, Gregg Kellogg <gregg@kellogg-assoc.com> wrote:
> Gavin, I'm working on the JSON-LD spec and wanted to get a firm definition of the URI join semantics, which are different for @base and @prefix. @base uses the join rules from RFC3986, which don't do the right thing for @prefix, in the case that the @prefix is defined using a fragid. You don't seem to have addressed this specifically in [1] either.
>
> In JSON-LD, the context can have @base, @vocab and term/prefix mappings, so we have a similar issue.
>
> In Turtle, If I have the following:
>
> @base <http://example.com/frag#> .
> @prefix : <http://example.com/frag#> .
> <a> :b "c" .
>
> I'll get the following triple:
>
> <http://example.com/a> <http://example.com/frag#b> "c" .
>
> because of the different in join semantics.
>
> For @base, I just reference RFC3986, but haven't found a reference that addresses URI join semantics for @prefix. I could add something about treat it as a textual concatenation; have you thought about how to spec this?

Turtle [1] address this by reference to a section of SPARQL [2], It
may be clearer to directly restate the text in Turtle. Not sure.

SPARQL addresses prefixes it with the following text:

"A prefixed name is mapped to an IRI by concatenating the IRI
associated with the prefix and the local part."

--Gavin

[1] http://dvcs.w3.org/hg/rdf/raw-file/default/rdf-turtle/index.html#sec-syntax
[2] http://www.w3.org/TR/sparql11-query/#QSynIRI

Received on Saturday, 20 August 2011 03:23:54 UTC