[uf-discuss] Enumerating Microformats on a Page

Phil Haack haacked at gmail.com
Thu Mar 23 23:29:51 PST 2006


Hello, forgive me if this question comes across as naïve or uninformed as I
am new to the list, but I have tried to soak in as much information as
quickly as possible via the wiki and mailing list, but haven't found an
answer to something I've been thinking about.

I was considering writing a simple Javascript that would iterate elements in
a page and somehow highlight any and all microformats in use on a page.  The
trouble is there appears to be no common identifier for microformats that
would indicate that a snippet of XHTML is a microformat.  I'd have to know
the format for all possible microformats ahead of time, which of course is
impossible since the creation of a microformat is distributed, correct?

I can see such a script as being useful as a Bookmarklet to show a user
which elements of a page are microformats.

My first question, is there some common identifier that I'm just missing?
Second, is there a philosophical or practical reason not to have some
identifier?  One reason I can think of is that it may be slightly unwieldy.

  <div class="vcard">...</div>

Might become

  <div class="microformat vcard">...</div>

Or

  <div class="mf vcard">...</div>

Perhaps an auto-discovery mechanism or "table of contents" Microformat might
be helpful in this case?  I'm still trying to catch up on where the
auto-discovery discussion is currently situated.  I wrote a post on some
thoughts here (relevant part starts 3rd para down
http://haacked.com/archive/2006/03/21/Mix06MicroformatsAutodiscovery.aspx)
in the hopes that someone would enlighten me a bit ;)  

Thanks for your time!
Phil



More information about the microformats-discuss mailing list