WebSchemas/TemporallyScopedMarkup

From W3C Wiki
Jump to: navigation, search

Temporally Scoped Markup

This is a brief proposal (initially from Dan Brickley) to explore some ideas around temporally scoped markup for structured data.


Goals:

  • build upon RDF's triple model, but supply temporal context during which certain claims hold
  • show at least one concrete HTML syntax
  • show example of RDF quads that might be emitted by a parser

This specific example uses Microdata in HTML. It exploits and recycles the otherwise barely-needed 'itemscope' construct from Microdata. The Microdata spec does not define any values for the 'itemscope' attribute. Here we simply say that 'itemscope' can sometimes take strings that indicate a temporal scope. Similar conventions for RDFa could be developed.

<div itemscope itemtype="http://schema.org/Movie">
 
<h1 itemprop="name">Pirates of the Carribean: On Stranger Tides (2011)</h1>
<span itemprop="description">Jack Sparrow and Barbossa embark on a quest to
 find the elusive fountain of youth, only to discover that Blackbeard and
 his daughter are after it too.</span>
Director:
 <div itemprop="director" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Rob Marshall</span>
</div>
Writers:
 <div itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Ted Elliott</span>
</div>
<div itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Terry Rossio</span>
</div>
Stars:
 <div itemprop="actor" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Johnny Depp</span>,
 </div>
<div itemprop="actor" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Penelope Cruz</span>,
</div>
<div itemprop="actor" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">Ian McShane</span>
</div>
<div itemprop="aggregateRating" itemscope="2011-01/2011-12" itemtype="http://schema.org/AggregateRating">
  <span itemprop="ratingValue">8</span>/<span itemprop="bestRating">10</span> stars from
  <span itemprop="ratingCount">200</span> users.
  Reviews: <span itemprop="reviewCount">50</span>.
</div>
</div>

Perhaps...

Very much first thoughts (danja) :

Possible issue with above:

  • itemscope="2011-01/2011-12" alone doesn't give the type of the scoping
  • scope is more or less a synonym for named graph (see below), tying it to a temporal property seems to be missing the general case
  • solely using 'itemscope' in the outer div seems to make it harder work than it needs to be

tweaking it, I'd suggest it'd be easier to simply give all the details as an itemscope on the outer div (including type)

if I hadn't seen this suggestion, my first impulse would be to try and avoid using itemscope at all

hmm. what does a hash URL refer to in an RDFa/microdata interpretation - the doc content or the thing it refers to? If it's not a pun too far, maybe the latter could be squeezed in, something like:

<!-- no doubt invalid RDFa -->
 
<div id="thisScope">
   <div itemtype="http://schema.org/Movie">
      <h1 itemprop="name">Pirates of the Carribean: On Stranger Tides (2011)</h1>
   </div>
</div>
 
<div class="description" about="#thisScope">
  <div property="dc:created" content="2011"/>
</div>