W3C home > Mailing lists > Public > public-vocabs@w3.org > February 2015

Re: JSON-LD onsite examples: are @context values missing a trailing slash?

From: Niklas Lindström <lindstream@gmail.com>
Date: Tue, 17 Feb 2015 17:12:51 +0100
Message-ID: <CADjV5jc6jn6t11Oi_fMeoYU9KKXZTDt8ocG8Z5RU=xJpHfC0Rg@mail.gmail.com>
To: Jarno van Driel <jarnovandriel@gmail.com>
Cc: W3C Web Schemas Task Force <public-vocabs@w3.org>
On Tue, Feb 17, 2015 at 4:20 PM, Jarno van Driel <jarnovandriel@gmail.com>
wrote:

> I noticed that the @context value in the JSON-LD examples on schema.org's
> site are noted as:
>
> "@context": "http://schema.org",
>
> Where "http://schema.org" doesn't contain a trailing slash.
>
> Yet when I look at the official specs (http://www.w3.org/TR/json-ld/) I
> see all values do contain a trailing slash, eg:
>
> "@context": {
>     "@vocab": "http://schema.org/"
> }
>
> Now to me it seems that urls without a trailing slash would resolve in
> urls like for example schema.orgArticle as opposed to schema.org/Article,
> which makes me wonder whether or not the slash matters for the @context.
>
> Any thoughts?
>

The difference is that a @context value (if it is a string) represents a
URL to a context definition. This is mechanically dereferenced before
anything is interpreted. The @vocab value on the other hand, is used
syntactically to construct URIs by concatenating it with local terms (as
you describe).

Cheers,
Niklas
Received on Tuesday, 17 February 2015 16:13:50 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 17 February 2015 16:13:50 UTC