[uf-discuss] permalinks for microformat chunks of pages: use the 'id' attribute on root microformat elements

Drew McLellan lists at allinthehead.com
Fri Jun 23 03:22:59 PDT 2006

On 23 Jun 2006, at 09:52, Jeremy Keith wrote:

> Tantek wrote:
>> The microformat chunks (e.g. hCards, hCalendar events, hReviews  
>> etc.) that
>> have an "id" attribute are much easier to automatically reference  
>> (and thus
>> link to and browser/scroll to from search results) than those  
>> without.
> +1
> I absolutely think that IDs make referencing easier but I'm  
> thinking more about IDs on the elements *containing* the hCard(s)  
> rather than on the hCard itself.

I'm slightly wary of any pattern that prescribes doing anything  
outside the root element of a given µF. context.

One proposal would be to introduce a very simple pattern for groups  
of hCards - just like groups in address book programs (friends,  
family, collegues etc). In XHTML we already have a mechanism of  
grouping elements - the class attribute. So how about treating hCards  
that share a common class name other than 'vcard' as a loose group?

<div class="vcard brighton">
     <div class="fn">Jeremy Keith</div>

<div class="vcard brighton">
     <div class="fn">Andy Budd</div>

<div class="vcard">
     <div class="fn">Drew McLellan</div>

Granted, there's danger of the concept duplicating problems already  
solved by either XFN, or by intrinsic groupings already created by  
the values within the hCards themselves. Most groupings I imagine are  
based on location, companies, or XFN properties like friends,  
collegues, family. I think we'd also need to see more real-world  
examples to demonstrate a need for something like this.

I guess two examples would be your d.Construct Locations page, where  
groups are travel, accomadation, freewifi, etc, and the LPG site I  
did the other week where all my hCards were gas stations, and would  
be sensible to group as such. It gets more complex with the  
d.Construct case, though, where you'd actually want to group  
everything overall into one 'dconstruct' group too. e.g.

<div class="vcard travel dconstruct">
     <div class="fn org">Brighton Train Station</div>

The above would belong to the travel group and the dconstruct group.  
I'm not sure how a parser would know how those should be nested,  
however. (Does each of travel, accomodation, freewifi contain a  
dconstruct group, or does the dconstruct group contain the others?).  
So you'd need rules about group name exclusivity .. and all in all I  
think I've talked myself out of the idea ;)


More information about the microformats-discuss mailing list