- From: Dan Brickley <danbri@google.com>
- Date: Thu, 27 Mar 2014 14:47:34 +0000
- To: Gregg Kellogg <gregg@greggkellogg.net>
- Cc: Jarno van Driel <jarno@quantumspork.nl>, Jason Douglas <jasondouglas@google.com>, Guha <guha@google.com>, W3C Web Schemas Task Force <public-vocabs@w3.org>
On 26 March 2014 21:42, Gregg Kellogg <gregg@greggkellogg.net> wrote: > On Mar 26, 2014, at 2:22 PM, Dan Brickley <danbri@google.com> wrote: > Because nothing in RDFa can be simple, either @about or @resource may be used to set the subject. RDFa Lite recommends just using @resource. @about is historical, but necessary for more complicated markup. Formally, @about sets the current subject and @resource the current object, but in sub-elements, the previous object becomes the default current subject. (Trust me, stick with RDFa Lite so your head doesn't explode!) Talking of which, the example you fixed up later in the thread for @rev seems to require @rel rather than @property. Anyway I added it to https://www.w3.org/wiki/WebSchemas/RolesPattern#Examples along with a warning that it deviates from the original proposal, and a graphviz visualization: <div vocab="http://schema.org/" typeof="Movie"> <span property="name">Ghostbusters</span> <div property="hasRole" typeof="MovieRole"> <span property="characterName">Dr. Peter Venkman</span> <div rel="actor" rev="inRole" typeof="Person"> <span property="name">Bill Murray</span> </div> </div> </div> https://www.w3.org/wiki/images/3/33/Servlet_7664281029414785522.png Given that doing this is hard in both Microdata and JSON-LD, my guess is that we can't be too demanding in terms of wanting a relation _from_ the Person _to_ the Role. And semantics-wise, an appropriately backwards-named relation from the Role to the Person (alongside the domain-specific 'actor' property) would tell us much the same thing. For example, trying that with 'roleFor' as the name (assumed to be inverse of inRole): <div vocab="http://schema.org/" typeof="Movie"> <span property="name">Ghostbusters</span> <div property="hasRole" typeof="MovieRole"> <span property="characterName">Dr. Peter Venkman</span> <div rel="actor roleFor" typeof="Person"> <span property="name">Bill Murray</span> </div> </div> </div> And here it is in Microdata: <div itemscope itemtype="http://schema.org/Movie"> <span itemprop="name">Ghostbusters</span> <div itemprop="hasRole" itemscope itemtype="http://schema.org/MovieRole"> <span itemprop="characterName">Dr. Peter Venkman</span> <div itemprop="actor roleFor" itemscope itemtype="http://schema.org/Person"> <span itemprop="name">Bill Murray</span> </div> </div> </div> This works in RDFa/Microdata because they both have a notation that allows for several kinds of relationship to be given on a single property attribute. I don't know of a comparable construction in JSON-LD, so I guess we'd need @id there? Dan
Received on Thursday, 27 March 2014 14:48:03 UTC