[uf-dev] Re: Perl module - HTML::Microformats

Toby Inkster mail at tobyinkster.co.uk
Wed Mar 10 15:06:23 PST 2010


On Wed, 2010-03-10 at 09:26 -0800, Tantek Çelik wrote:
> Please consider also implementing the value class pattern, as it
> greatly helps improve accessibility:
> 
> http://microformats.org/wiki/value-class-pattern

This page covers a variety of parsing features which I'll talk about
separately:

1. "classic" value excerption: e.g.

  <span class="fn">
    <span class="value">Toby </span>
    Andrew
    <span class="value">Inkster</span>
  </span>

This was supported in cognition 0.1-alpha7 (April 2008) and in
HTML::Microformats from the start.

2. Splitting up date, time and timezone values: e.g.

  <span class="dtstart">
    At <span class="value">19:10:00</span>
    on <span class="value">2008-07-24</span>
  </span>

That's been supported since cognition 0.1-alpha11 (release date as per
the HTML above!), and again has been in HTML::Microformats since the
start. As it was implemented long before the pattern became fully
documented on the Wiki, it probably needs checking against the test
cases.

3. Leaving out parts of the dtend and implying them from dtstart. e.g.

  <span class="dtstart">
    At <span class="value">19:10:00</span>
    on <span class="value">2008-07-24</span>
  </span>
  <span class="dtend"><span class="value">21:10:00</span></span>

This is not yet supported and may take some time to support. Each
property is parsed fairly independently you see, so adding feedback from
parsing dtstart into the parsing of dtend will need some work.

> > (hCalendar 1.1 <http://microformats.org/wiki/User:TobyInk/hcalendar-1.1>
> > is an unofficial draft that takes hCalendar 1.0, expands upon
> > underspecified parts of the official spec, cuts out some cruft,
> 
> I believe I have requested this before, but just in case it got lost in email.
> 
> Could you please document the issues you believe you have found in
> hCalendar 1.0 on the hCalendar issues page [1] (checking for previous
> reports on resolved/closed issues of course
>  [2][3]) ?
> 
> Lots of folks have reported issues, all of which have been resolved
> and/or closed to date, thus making the resolved/closed issues pages a
> good source of hCalendar errata while they get incorporated into the
> hCalendar 1.0.1 and hCalendar 1.1 works in progress.
> 
> I'd like to incorporate fixes for the issues you've found as well into
> hCalendar, in addition to everyone else's reported issues and fixes.

I've mentioned my motivations on the hcalendar-brainstorming page.
Essentially it boils down to one thing. hCalendar 1.0 states that it's
"a 1:1 representation of the aforementioned iCalendar standard, in
semantic HTML". This implies that every feature of iCalendar is
supported in hCalendar. However, most iCalendar properties are
undocumented in the hCalendar spec, leaving implementors to guess
exactly how they should be implemented - e.g. singular properties vs
plural, URLs versus strings, etc. I needed a detailed specification that
I could work to when coding, and point to when documenting.

In most senses it is simply a clarification of hCalendar 1.0. It takes
the Semantic XHTML Design Principles from the top of the spec and
applies them to the iCalendar properties ignored by the hCalendar 1.0
spec, to make an educated guess as to what hCalendar 1.0 would say about
them if it said anything at all.

It also makes three additional changes:

1. It scraps vtimezone. So in that sense, it's a less than 1:1 mapping.
vtimezone is pretty horrible.

2. It replaces vjournal with hAtom entries, and provides a table to help
map between iCalendar journal entries and hAtom entries.

> > and
> > provides a shortcut for todo lists.)
> 
> This seems like either a circumvention of the microformats process or
> implementation of your own poshformat for todo lists.

3. It adds class=vtodo-list. 

class=vtodo-list is essentially what happens if you put hCalendar's
vtodo component plus XOXO in a jar and shake it a bit.

By adding class=vtodo-list to a <ul> or <ol> element, you state that
every <li> descendant element has an implied class=vtodo, and if these
implied vtodos lack summary properties, the whole text of the vtodo
becomes the summary. 

> I for one think it would be great to have a proper to-do / task
> microformat, and would be interested in helping you pursue this.

hCalendar 1.0 already provides todo lists. It's just not documented.
HTML::Microformats is not the only parser that implements it. (X2V does,
but it's commented out; any23 seems to, though I haven't tested it.)

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



More information about the microformats-dev mailing list