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

On Oct 22, 2011, at 6:35 AM, Markus Lanthaler wrote:

I've just filed a new issue as it is not clear where prefixes are allowed
and how they have to be used.

3.1 in the Syntax documents determines when strings are interpreted as IRIs. There is no prevision for looking at a term mapping. That is done in 3.4 of the API doc.  (Prefixes are a special case, where the match is before the ':' and the suffix is simply appended to the term.)

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.

Are they just allowed in properties and objects or also in subjects!?

3.1 explicitly says

[[[
An IRI is generated for the value specified using @subject, if it is a string<http://json-ld.org/spec/latest/json-ld-syntax/#dfn-string>.
]]]


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.

How do we distinguish between IRIs and prefixes in properties?

Based on the presence of the mapping. API 3.4 makes this unambiguous.

IMO, when we separated processing from syntax this became less clear. I'll start to go through and be sure that there's some basic discussion in the Syntax document, but this might take a couple of passes.


--
Markus Lanthaler
@markuslanthaler

Received on Saturday, 22 October 2011 17:19:54 UTC