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

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, ...).

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.

> 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.


> > 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

Received on Sunday, 23 October 2011 09:34:30 UTC