RE: Use of full URI for rdf:type instead of @type

On Friday, May 09, 2014 10:45 PM, Dave Longley wrote:
> > Alternatively, I think you could also specify
> > "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" as an alias for @type
> > to get the desired effect:
> >
> > {
> >   "@context": {
> >     "http://www.w3.org/1999/02/22-rdf-syntax-ns#type": "@type"
> >   }
> > }

That's what I would have proposed as well.


> Actually, when I tried this on the playground it threw an error because
> we don't accept expanded "@id" values for "@type". I have a vague memory
> of us discussing this during standardization, hopefully we made the
> right decision here.

Really? What exactly are you doing? You have to add that declaration to the
input document's context, not the frame. The playground doesn't expose it,
but the API has an "expandContext" option [1] that you could use to pass
this in without having to directly modify the input document.

HTH,
Markus


[1] http://www.w3.org/TR/json-ld-api/#widl-JsonLdOptions-expandContext


--
Markus Lanthaler
@markuslanthaler

Received on Saturday, 10 May 2014 11:26:27 UTC