W3C home > Mailing lists > Public > public-linked-json@w3.org > October 2011

Re: Where are prefixes allowed? [ISSUE-38]

From: Gregg Kellogg <gregg@kellogg-assoc.com>
Date: Sun, 23 Oct 2011 15:45:23 -0400
To: Markus Lanthaler <markus.lanthaler@gmx.net>
CC: Linked JSON <public-linked-json@w3.org>, Gregg Kellogg <gregg@kellogg-assoc.com>
Message-ID: <2AB0C3A2-8DA1-4AE7-8614-FA27A17D0A1F@greggkellogg.net>
On Oct 23, 2011, at 2:33 AM, Markus Lanthaler wrote:

> OK, so summarized it means that a value of a @subject, @type, and @iri as
> well as a value coerced to @iri is considered to be an IRI.
> 
> The value is then split into prefix/suffix at the first occurrence of ':'.
> If the prefix is a "_", the IRI will remain unchanged (i.e. a blank node).
> 
> If there is a term definition for prefix in the context, the prefix will be
> replaced with that definition and prepended to the (possible empty) suffix
> using textual concatenation.
> 
> If there is no mapping for the prefix it will be interpreted as IRI as it
> is. That means if it is relative IRI and it is a property, it will be joined
> to the @vocab base IRI, if it is a subject or object it will be joined to
> the @base IRI. Otherwise it will be converted to a absolute IRI by using the
> documents base IRI (if available).
> 
> How are terms and prefixes interpreted in context definitions? Are they
> allowed there? I think that could help in some situations but cause more
> troubles than advantages (recursive mappings, copy-and-paste errors, ...).

Terms and prefixes MAY be used in the @coerce section, but not in @context. All IRIs (including @base) MUST be in the form of an absolute IRI; I'll make this clear in both docs.

> In the API spec, section 3.4 IRI Expansion the sentence
> 
> "IRIs may be represented as an absolute IRI, a term, a prefix:term
> construct, or as a value relative to @base or @vocab."
> 
> is a bit misleading because the prefix is used as a term and not the suffix.
> So either we change it to prefix:suffix or to term:suffix.

Yes, I think we noted this before, but the document never was updated. I'll take care of this.

>> We need to add something to the Syntax document that makes
>> this clear. I'm in the document now anyway, so I'll take
>> care of it.
> 
> Great
> 
> 
>>> Do objects using prefixes have to be coerced using
>>> @iri? If so, how do we distinguish between IRIs and
>>> prefixes without using CURIE's square brackets?
>> 
>> If the string has a prefix or term mapping, it's used to
>> create the IRI. Otherwise, it is joined to either @vocab
>> or @base.
> 
> Does that means that if there is a prefix or term mapping, @vocab and @base
> won't be used? I understand API spec 3.4 that @vocab and @base will be used
> regardless of that - assuming that it is a relative IRI (which isn't
> mentioned at all!).
> 
> This would imply that prefix/term mappings would have to be absolute IRIs,
> is that how it is intended to be? If so we should specify that. At the
> moment, all the examples use absolute IRIs.
> 
> 
>>> How do we distinguish between IRIs and prefixes in
>>> properties?
>> 
>> Based on the presence of the mapping. API 3.4 makes this
>> unambiguous.
> 
> OK, so if there is a mapping, it will be used. We should highlight that also
> in the syntax spec, possibly in section 3.1 IRIs.
> 
> 
> 
> --
> Markus Lanthaler
> @markuslanthaler
> 
> 
> 
> 
> 
Received on Sunday, 23 October 2011 19:46:02 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:25:35 GMT