W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > August 2011

Fwd: Attempt for a List specification in RDFa (was Re: Suggestions for rdf:List and a value type shorthand)

From: Ivan Herman <ivan@w3.org>
Date: Fri, 26 Aug 2011 09:08:27 +0200
To: W3C RDFWA WG <public-rdfa-wg@w3.org>
Message-Id: <2DE60FF8-D97F-4583-ADB1-C5F6C251D9D8@w3.org>
Forward to tracker, ISSUE-106

Begin forwarded message:

> From: Jeni Tennison <jeni@jenitennison.com>
> Date: August 26, 2011 07:51:56 GMT+02:00
> To: Ivan Herman <ivan@w3.org>, Niklas Lindström <lindstream@gmail.com>
> Cc: public-rdfa-wg <public-rdfa-wg@w3.org>
> Subject: Re: Attempt for a List specification in RDFa (was Re: Suggestions for rdf:List and a value type shorthand)
> 
> Ivan, Niklas, others,
> 
> On 24 Aug 2011, at 15:57, Ivan Herman wrote:
>> I tried to modify my original approach based on the discussion we had:
>> 
>> http://www.w3.org/2010/02/rdfa/wiki/Lists
> 
> 
> As you know, the issue about lists arose from trying to identify what changes might be made that would make it easier for people to combine or switch between microdata and RDFa. If you are going to introduce syntax sugar for rdf:List (which I think you should) then I'd favour something that was easy to map to the microdata over something that wasn't.
> 
> The example on the wiki page is:
> 
> <li about="http://www.worldcatlibraries.org/isbn/9780262912423" 
>     typeof="bibo:Book">
>   <span rel="dc:creator" collection>
>     <span member>Grigoris Antoniou</span> and
>     <span member>Frank van Harmelen</span>
>   </span>
> </li>
> 
> In microdata this would be:
> 
> <li itemid="http://www.worldcatlibraries.org/isbn/9780262912423" 
>     itemtype="../Book">
>   <span>
>     <span itemprop=".../creator">Grigoris Antoniou</span> and
>     <span itemprop=".../creator">Frank van Harmelen</span>
>   </span>
> </li>
> 
> Going the other way, a microdata example is:
> 
> <section itemscope itemtype="http://example.org/animals#cat">
>  <h1 itemprop="name http://example.com/fn">Hedral</h1>
>  <p itemprop="desc">Hedral is a male american domestic
>  shorthair, with a fluffy <span
>  itemprop="http://example.com/color">black</span> fur with <span
>  itemprop="http://example.com/color">white</span> paws and belly.</p>
>  <img itemprop="img" src="hedral.jpeg" alt="" title="Hedral, age 18 months">
> </section>
> 
> Assuming the http://example.com/color property needed to have a list, this would turn into:
> 
> <section vocab="http://example.org/animals#" typeof="cat">
>  <h1 property="name http://example.com/fn">Hedral</h1>
>  <p property="desc">Hedral is a male american domestic
>  shorthair, with a fluffy <span rel="http://example.com/color" collection><span
>  member>black</span> fur with <span
>  member>white</span></span> paws and belly.</p>
>  <span rel="img"><img src="hedral.jpeg" alt="" title="Hedral, age 18 months">
>  </span>
> </section>
> 
> So the RDFa proposal requires a wrapper element around the items of the list and moves the relationship onto the wrapper element, whereas the microdata one just aggregates the items based on the property.
> 
> While I can see the logic of the wrapper element, it does constrain the structure of the HTML. It prevents people from mixing other properties amongst the members of the list (though I struggle to come up with a persuasive example where you'd want to do that; perhaps someone else can think of one).
> 
> I guess an alternative that alleviates this would be:
> 
> <li about="http://www.worldcatlibraries.org/isbn/9780262912423" 
>     typeof="bibo:Book">
>   <span property="dc:creator" member>Grigoris Antoniou</span> and
>   <span property="dc:creator" member>Frank van Harmelen</span>
> </li>
> 
> This also has the advantage of making it easier to adapt existing RDFa to create lists rather than multiple triples with the same property: you just add the 'member' attribute as required. If a property element didn't have the member attribute:
> 
> <li about="http://www.worldcatlibraries.org/isbn/9780262912423" 
>     typeof="bibo:Book">
>   <span property="dc:creator" member>Grigoris Antoniou</span> and
>   <span property="dc:creator">Frank van Harmelen</span>
> </li>
> 
> then I'd suggest it wouldn't be part of the list for that property:
> 
>  <http://www.worldcatlibraries.org/isbn/9780262912423>
>    a bibo:Book ;
>    dc:creator ("Grigoris Antoniou") ;
>    dc:creator "Frank van Harmelen" ;
>    .
> 
> I suggest this approach as being easy to use from an author's perspective (particularly an author who isn't used to thinking about lists as a type of resource). I'm not sure how it could be described in processing terms. Perhaps collect a map of property->list for those elements with a 'member' attribute, and when you finish processing the element turn any such maps into triples with the relevant rdf:List.
> 
> In short, I think that approaches to expressing lists that use a wrapper element for the list itself are going to be constraining for people to use, particularly when mixed with microdata.
> 
> Cheers,
> 
> Jeni
> -- 
> Jeni Tennison
> http://www.jenitennison.com
> 


----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf
Received on Friday, 26 August 2011 07:05:56 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:19:52 UTC