W3C home > Mailing lists > Public > public-vocabs@w3.org > April 2014

Re: Inverse properties, was: Re: Socialnetworks of a person or organization

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Mon, 14 Apr 2014 09:50:56 -0700
Cc: Dan Brickley <danbri@google.com>, Charles McCathie Nevile <chaals@yandex-team.ru>, W3C Web Schemas Task Force <public-vocabs@w3.org>, Ramanathan Guha <guha@google.com>
Message-Id: <5FE8DCCE-D098-4892-B2EC-3D4C671300A2@greggkellogg.net>
To: "martin.hepp@ebusiness-unibw.org" <martin.hepp@ebusiness-unibw.org>
I've been thinking about updates to the Microdata to RDF note [1] as well. In particular, abandoning the registry [2], which rapidly becomes outdated, and making use of the JSON-LD context, which one day soon (?) will show up at http://schema.org. One opportunity this might give us is to use @reverse term definitions in the JSON-LD context as the value of an @itemprop. If schema.org defined and supported such term definitions, this would provide a mechanism to get the effect of reverse properties without needing to change Microdata.

This works well for Microdata when interpreted as RDF, but is more problematic in the original transformation to Microdata JSON, where the data model is that of a tree, and not a graph. I'm sure it could be done, but it does provide some challenges to the processing algorithm, whereas doing this in the context of an RDF transformation is more natural.

The example from the Wiki, a schema.org context could assert the following term:

  "@context": {
    "@vocab": "http://schema.org/",
    "isCreatorOf": {"@reverse": "creator"},

You could then use this in microdata as follows:

<div id="creator" itemprop="creator" itemscope itemtype="http://schema.org/Person">
	<span itemprop="name">William Shakespeare</name>
	<link itemProp="isCreatorOf" href="http://www.freebase.com/m/0yq9mqd">

In a way, this is like defining reverse properties, except that it does not confuse the vocabulary, but really just exists as a syntactic shortcut.

This would also be useful to describe @itemprop values as being in a list or not, which may be useful for properties such as event, itemListElement and recipeInstructions, if the schema.org JSON-LD context made use of the @container: @list term definition.

While we're at it, we could re-visit the need for md:item in the RDF transformation to keep all top-level @itemscope entries in order. This was a relic from the original RDF transformation in Microdata that in retrospect, I think provides little value in an RDF interpretation.

IMO, the Microdata JSON model is not as useful as the RDF model for use with schema.org, so focusing on improving the transformation of Microdata to RDF makes more sense, and more closely aligns it with JSON-LD and RDFa.

Gregg Kellogg

[1] http://www.w3.org/TR/microdata-rdf/
[2] http://www.w3.org/ns/md

On Apr 14, 2014, at 7:57 AM, martin.hepp@ebusiness-unibw.org wrote:

> I just added eight markup examples of how useful a new keyword for reverse properties in Microdata would be:
>    https://www.w3.org/wiki/WebSchemas/InverseProperties#Examples_and_Use_Cases
> Best
> Martin
> -----------------------------------
> martin hepp  http://www.heppnetz.de
> mhepp@computer.org          @mfhepp
Received on Monday, 14 April 2014 16:51:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:29:39 UTC