- From: Markus Lanthaler <markus.lanthaler@gmx.net>
- Date: Thu, 4 Sep 2014 12:50:24 +0200
- To: <public-hydra@w3.org>
On Thursday, August 28, 2014 6:27 PM, Dietrich Schulten wrote:
> Ah, it didn't occur to me that the last term definition wins. Probably
> that technique is preferable over hydra:xxx. Maybe the examples in the
In most cases yes.
> spec could show how to do it. Could this be a reason to avoid
I'm a bit on the fence about this because it is not about Hydra but about JSON-LD.
> schema.org property names if they are likely to force everybody to
> work around namespace collision right from the start? Description is
No, I don't see this as a reason to avoid schema.org property names.
> probably very common in other vocabs, commentDescription or so might
> be better? Or we prefix everything with hydra in the first place?
Creating contexts is very cheap.. especially for small vocabularies such as Hydra. We could, e.g., create a context which prefixes everything with an "h" (or any other character).. so "description" would become "hDescription".
> ---- Markus Lanthaler schrieb ----
>
> Hi Dietrich ,
>
> On 24 Aug 2014 at 08:58, Dietrich Schulten wrote:
> > I want to mix Hydra with schema.org. I found that there is potential
> > for collisions and I am unsure how to solve them.
> >
> > {
> > "@context": [
> > "http://www.w3.org/ns/hydra/context.jsonld",
> > {
> > "@vocab" : "http://schema.org/"
>
> You can add an explicit mapping for description here:
>
> "description": "http://schema.org/description"
>
> > }
> > ],
> > "@type": "Movie",
> > "description": "Jack Sparrow and Barbossa embark on a quest",
> > "name": "Pirates of the Carribean",
> > "operation": [
> > {
> > "@type": "DeleteResourceOperation",
> > "method": "DELETE"
> > }
> > ]
> > }
>
> [...]
>
> > IOW, hydra has hijacked the description attribute.
> >
> > Would the solution be not to define
> > "http://www.w3.org/ns/hydra/context.jsonld" in the context, but only a
> > term hydra and apply hydra: to every single hydra term?
>
> That would be an alternative solution, yeah. The downside is that you end up
> having all those colons in your terms that make it more difficult to work
> with the data (e.g. JavaScript's dot notation breaks can't be used anymore).
>
>
> > If so, is it possible to point to hydra's external context file when
> > mixing with schema.org?
>
> If you use the hydra prefix, there's no need to point to Hydra's context.
> You could also define a context which defines Hydra's terms in another form
> to reduce the likelihood of collisions.. something like hydraDescription or
> even _description.
>
>
>
> HTH,
> Markus
>
>
> --
> Markus Lanthaler
> @markuslanthaler
Received on Thursday, 4 September 2014 10:50:48 UTC