- From: Laurence Rowe <l@lrowe.co.uk>
- Date: Wed, 12 Mar 2014 10:59:35 -0700
- To: Markus Lanthaler <markus.lanthaler@gmx.net>
- Cc: public-linked-json@w3.org
- Message-ID: <CAOycyLRW0RVgOexnUzM-1Y_KQK94-1=LDa8OUGAofL9On87b5A@mail.gmail.com>
On 12 March 2014 07:33, Markus Lanthaler <markus.lanthaler@gmx.net> wrote:
> Hi Laurence,
>
> On Wednesday, March 12, 2014 4:38 AM, Laurence Rowe wrote:
> > Given a json-ld document like the following, is it possible to specify
> > a context such that the types and property names get prefixed with
> > different base urls?
> >
> > {
> > "@type": ["organism", "item"],
> > "@id": "/organisms/human",
> > "name": "human",
> > "scientific_name": "Homo sapiens",
> > "taxon_id": "9606"
> > }
>
> Do you mean sothat types use a different base than property names, or that
> *types and property names* use a different base than @id?
>
> The former is possible by mapping the terms to different URLs in the
> context
> like so:
>
> {
> "@context": {
> "organism": "http://example.com/typeBase/organism",
> "name": "http://example.org/propBase/name",
> ...
> }
> }
>
>
Sorry, I wasn't explicit before. In my case it's possible that the property
name and the type name could be the same. I'd like the former to expand to
the url /properties/organism and the latter to /types/organism. It looks
like this is not be possible with using namespace prefixes.
Cheers,
Laurence
Received on Wednesday, 12 March 2014 18:00:07 UTC