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

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