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

RE: Nested structures / ISSUE-26 (was: An updated draft of the schema.org/Action proposal)

From: Markus Lanthaler <markus.lanthaler@gmx.net>
Date: Mon, 3 Mar 2014 19:15:10 +0100
To: "'Sam Goto'" <goto@google.com>
Cc: "'W3C Web Schemas Task Force'" <public-vocabs@w3.org>, <public-hydra@w3.org>
Message-ID: <029601cf370c$85fe3b40$91fab1c0$@lanthaler@gmx.net>
On Monday, March 03, 2014 5:22 PM, Sam Goto wrote:
> On Fri, Feb 14, 2014 at 9:19 AM, Markus Lanthaler wrote:
> > On Friday, February 14, 2014 1:31 AM, Sam Goto wrote:
> > > *majorly patterned after
> > > https://developers.google.com/gmail/actions/reference/review-action
> > >
> > >   {
> > >     "@context": "http://schema.org",
> > >     "@id": "http://code.sgo.to/products/123",
> > >     "@type": "Product",
> > >     "name": "A product that can be reviewed",
> > >     "operation": {
> > >       "@type": "ReviewAction",
> > >       "requiredProperties": [{
> > >         "path": "reviewBody"
> > >       }, {
> > >         "path": "reviewRating.ratingValue"
> > >       }]
> > >     }
> > >   }
> > >
> > > The "contents" of this payload is equivalent to:
> > >
> > >   http://schema.org/reviewBody - required
> > >   http://schema.org/reviewRating - required (transitively inferred
> > > via a sub-property being required too)
> > >       http://schema.org/ratingValue - required
> > >
> > > Now, you can certainly formalize the path language to something like
> > > SPARQL queries, XPATH/XSLT (yikes, I know) or the likes.
> > 
> > Right, the simplest thing however, would probably be to just use an
> > ordered list
> > 
> >   {
> >     "@context": {
> >       "@vocab": "http://schema.org",
> >       "path": { "@type": "@vocab", "@container": "@list"}
> >     },
> >     "@id": "http://code.sgo.to/products/123",
> >     "@type": "Product",
> >     "name": "A product that can be reviewed",
> >     "operation": {
> >       "@type": "ReviewAction",
> >       "requiredProperties": [{
> >         "path": [ "reviewBody" ]
> >       }, {
> >         "path": [ "reviewRating", "ratingValue" ]
> >       }]
> >     }
> >   }
> > 
> > That way, your JSON-LD processor would take care of the expansion of
> > "reviewRating" etc. to full IRIs if desired.
> 
> Just as one more data point, it was just brought to my attention that
> RSDL seems to be using this (i.e. the "review.reviewBody" approach)
> approach:
> 
> http://en.wikipedia.org/wiki/RSDL

Interesting. I haven't heard of RSDL before. Is it used for something else than oVirt? Anyway... we need keep in mind that RSDL deals with XML trees and not (RDF) graphs



--
Markus Lanthaler
@markuslanthaler
Received on Monday, 3 March 2014 18:15:42 UTC

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