Re: RDFa and Microformats

On 15 Sep 2008, at 02:16, Martin McEvoy wrote:
> Martin McEvoy wrote:
>> Its just seems counter productive to me? It seems RDFa can help  
>> the wider community by suggesting....
>>
>> <div class="vevent">
>>  <h3 class="summary">Have I Got Old News For You</h3>
>>  <p class="location">BBC2</p>
>>  <p><span property="dtstart"  
>> content="2008-06-28T21:00:00">Saturday 28 June,
>>     9</span>-<span property="dtend"  
>> content="2008-06-28T21:30:00">9.30pm</p>
>>  <p class="description">Team captains Paul Merton and Ian Hislop
>>     are joined by returning guest host Jeremy Clarkson and
>>     panellists Danny Baker and Germaine Greer for the
>>     topical news quiz. <abbr title="in stereo">[S]</abbr></p>
>> </div>

The problem with this syntax, which Mark has already pointed out, is  
that you have nothing to "scope" the two property attributes. An RDFa  
parser will see the "dtstart" and "dtend" properties as being scoped  
to the whole page, and not to the event. Indeed, in the RDF/XML file  
you posted earlier as an interpretation of this HTML was along the  
lines of:

	<c:Vcalendar r:about="">
	  <c:component>
	    <c:Vevent>
	      <c:summary>...</c:summary>
	      <!-- etc -->
	    </c:Vevent>
	  </c:component>
	  <c:dtstart>2008-06-28T21:00:00</c:dtstart>
	  <c:dtend>2008-06-28T21:30:00</c:dtend>
	</c:Vcalendar>

That is, the dtstart and dtend are being interpreted as properties of  
the *calendar*, not of the *event*.

> Ok then just thinking "way out of the box"

Not so far out of the box as you think perhaps...
http://microformats.org/discuss/mail/microformats-dev/2008-June/ 
000561.html

;-)

> I have updated http://weborganics.co.uk/demo/hcal.xhtml
> to use the example above, but instead of using @property It uses  
> @class with @content (valid xhtml this time)
>
> <div class="vevent">
> <h3 class="summary">Have I Got Old News For You</h3>
> <p class="location">BBC2</p>
> <p><span class="dtstart" content="2008-06-28T21:00:00">Saturday 28  
> June,
>    9</span>-<span class="dtend"  
> content="2008-06-28T21:30:00">9.30pm</span></p>
> <p class="description">Team captains Paul Merton and Ian Hislop
>    are joined by returning guest host Jeremy Clarkson and
>    panellists Danny Baker and Germaine Greer for the
>    topical news quiz. <abbr title="in stereo">[S]</abbr></p>
> </div>

This is a much better idea. The content attribute solves the  
accessibility issue with ISO datetimes, and the use of it doesn't  
conflict at all with RDFa's parsing rules.

Personally, I haven't implemented this yet, waiting to see first if  
it seems like a popular approach. (I have however implemented support  
for <time class="dtstart" datetime="2008-06-28 21:00:00">Saturday 18  
June, 9pm</time> from HTML5.)

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>

Received on Monday, 15 September 2008 10:56:42 UTC