[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 04:08:28 PDT 2006


On 23 Jun 2006, at 11:51, Dimitri Glazkov wrote:

> On 6/23/06, Drew McLellan <lists at allinthehead.com> wrote:
>> 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>
>>
>> <div class="vcard brighton">
>>      <div class="fn">Andy Budd</div>
>> </div>
>>
>> <div class="vcard">
>>      <div class="fn">Drew McLellan</div>
>> </div>
>>
>
> I think it's only logical. However, using IDs is what gives the
> capability to address a specific microformat content outside of the
> context of the document (URL, in less fancy words). How would one use
> classes to do the same?

Oh, it wouldn't. I was thinking more along the lines of Jeremy's idea  
of addressing a group of hCards.

As for addressing an specific hCard from outside the document, then  
indeed, we just need a small set of ID conventions. An ID must be  
unique in a document of course, so these should be namespaced in some  
way, so as not to force publishers to rework existing documents. e.g.  
'author-vcard', not just 'author'. The only requirement on parsers  
then should be fragment support, which is already a requirement.

drew.


More information about the microformats-discuss mailing list