W3C home > Mailing lists > Public > public-html-data-tf@w3.org > October 2011

Re: Microdata implied property order

From: Gregg Kellogg <gregg@kellogg-assoc.com>
Date: Fri, 21 Oct 2011 14:25:54 -0400
To: Bob Ferris <zazi@smiy.org>
CC: "public-html-data-tf@w3.org" <public-html-data-tf@w3.org>
Message-ID: <8361F6E9-4BB2-42ED-9245-E4729D7C6763@greggkellogg.net>
On Oct 21, 2011, at 2:16 AM, Bob Ferris wrote:

> Hi Gregg,
> 
> On 10/20/2011 09:31 PM, Gregg Kellogg wrote:
> 
> [snip]
> 
>> Thanks Bob, I've used the Ordered List Ontology before, and recommended it as a best practice; thanks for creating that. The whole issue of collections and containers is getting a lot of discussion in the RDF WG right now, and no one seems entirely satisfied with either. However, Collections (RDF:List) seems to be the preferred choice at the moment.
>> 
>> At one time, I had suggested that the RDF WG consider something like the Ordered List Onotology as a better replacement for both Collections and Containers, but it does add a number of things that probably don't make it appropriate for direct syntactic support. For example, to add a track number requires asserting a property against the link element.
>> 
> 
> What do you exactly mean here? - The index number of a track in a 
> playlist or the track number that is related to a record this track is 
> taken from. The former one belongs to the slot object that encloses the 
> track object. The latter one belongs to the track object it self (and is 
> from my POV exactly on its right position) ;)

An RDFa example from some earlier CME markup might be useful (note CME interned the general concepts of OLO within the CME vocabulary):

    <div vocab="http://cme-spec.org/terms#" typeof="AudioCollection">
      <h1 property="title">Songs</h1>
      <ol rel="item">
        <li typeof="Item">
          <span property="itemNumber" datatype="xsd:nonNegativeInteger">1</span>
          <ul rel="expression">
            <li typeof="Audio">
              <h1 property="title">HappyBirthday</h1>
            </li>
          </ul>
        </li>
      </div>
    </div>

Contrast this with using an RDF Collection:

    <div vocab="http://cme-spec.org/terms#" typeof="AudioCollection">
      <h1 property="title">Songs</h1>
      <ol rel="expression" inlist="">
        <li typeof="Audio">
          <h1 property="title">HappyBirthday</h1>
        </li>
      </ol>
    </div>

In Microdata, this might be:

    <div itemscope itemtype="http://cme-spec.org/terms#AudioCollection">
      <h1 itemprop="title">Songs</h1>
      <ol>
        <li itemprop="expression" itemscope itemtype="http://cme-spec.org/terms#Audio">
          <h1 itemprop="title">HappyBirthday</h1>
        </li>
      </ol>
    </div>

In either case, it ends up removing a couple of levels of markup.

> Maybe one has to be able to provide a shortcut relation for lists as 
> well (List -> has -> Item), which are then additionally available to 
> their detailed descriptions (List -> has -> Slot -> has -> Item). 
> Detailed descriptions can then be mapped to shortcut relations. However, 
> doing this the other way around might be not possible, since the 
> shortcut relations do not include the index information.

In the short-cut version, the index could be implied, as with rdf:Seq.

> (anyway, I guess, this is more a topic for the vocabs mailing list ;) )
> 
>> Within the context of this TF, we're mostly concerned with the proper representation of the Microdata syntactic elements, including whether or not to honor the implied ordering multiple itemprop values as well as the items within the document themselves.
>> 
> 
> Okay, here is my proposal:
> 
> <div itemscope orderedlist itemtype="http://schema.org/MusicPlaylist">
> 	1. <div itemprop="tracks" index="1" itemscope 
> itemtype="http://schema.org/MusicRecording">...</div>
> 	2. <div itemprop="tracks" index="2" itemscope 
> itemtype="http://schema.org/MusicRecording">...</div>
> </div>
> 
> I added the 'orderedlist' tag to identify that this object should be 
> parsed as an ordered list. I added 'index=[index number]' to each slot 
> of that ordered list, i.e., the slot object is somehow hidden but its 
> index number is still available.

Adding attributes to Microdata (or HTML) would need to go through the HTML WG; this TF is focusing on the use of the existing Microdata specification to generate RDF.

Within the context of RDFa, the @inlist attribute could be a starting point. Right now, any value is ignored, but values could come from rdf:List, rdf:Seq, rdf:Bag, rdf:Option, or olo:OrderedList. Adding something to explicitly set an index value would be more difficult.

>> With regards to improving the schema.org playlist representation, you might consider bringing this topic up in public-vocabs@w3.org. In the Connected Media Experience (when it was RDF), we used a variation of the Ordered List Ontology for describing album tracks and playlists. The added HTML markup to represent them, while expressive, was considered to be something of a burden, unfortunately.
> 
> Yeah, that's why we'll need to add a bit syntactic sugar here ;)
> 
> Cheers,
> 
> 
> Bo

Gregg
Received on Friday, 21 October 2011 18:26:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 21 October 2011 18:26:36 GMT