[uf-new] hAudio issue D2 "title"

Toby A Inkster mail at tobyinkster.co.uk
Tue Sep 2 01:37:42 PDT 2008


Tantek wrote:

> 1. any class name starting with an "h" should be treated as a root  
> microformat which introduces a new scope

Classes that begin with an 'h' like 'header'?

<div class="hreview">
   <div class="header">
     <h1 class="summary">Blah blah blah</h1>
     <p class="reviewer vcard">
       <span class="fn">Joe Bloggs</span>
     </p>
   </div>
   <div class="description">...</div>
</div>

I can't imagine that constructions like this aren't common.  
'header'/'heading' seems to be one of the most commonly used HTML  
classes around and 'help' is far from uncommon too.
<http://code.google.com/webstats/2005-12/classes.html>
<http://westciv.typepad.com/dog_or_higher/2005/11/real_world_sema.html>

For that matter... classes that being with an 'h' like 'vcard', or  
'vcalendar', or 'vevent', or 'xfolkentry', or 'adr', or 'geo'?

A common pattern for root class names, with a low rate of false  
positives (e.g. /^uf[A-Z]/) would be ideal, but that ship has sailed.  
We don't have it, and it's not going to happen in the future.

> 2. introduce a root microformat classname like "hroot" or "hitem"  
> which introduces a new scope and require its use in addition to any  
> new microformat root class name (eg class="hitem haudio") this is  
> essentially the mfo solution but with a friendlier generic root  
> name. Feel free to brainstorm additional friendly generic root names.

This is certainly the most workable solution. In Cognition I support  
this with class="mfo", but if consensus forms around some other class  
name (e.g. hroot), then of course it's pretty easy to support that  
instead/as well. (Though I have to say that hitem is awful — it looks  
like "hit 'em" — an unnecessarily violent class name.)

I have published an algorithm for parsing microformats (which deals  
with most general cases, but not a few special cases) and put it in  
the public domain:

http://microformats.org/wiki/parsing-brainstorming

Including support for "hroot" would be as simple as adding it to this  
list:

http://microformats.org/wiki/parsing- 
brainstorming#Compound_microformat_root_classes

> 3. same as 2 except don't introduce any other root microformat- 
> specific class names, and use some other mechanism to specify what  
> type/kind of microformat the item is. E.g. all new microformats  
> would start with class="hitem" and then we come up with another way  
> of "typing" them.

I like this less.

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






More information about the microformats-new mailing list