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

Jeremy Keith jeremy at adactio.com
Fri Jun 23 01:52:56 PDT 2006


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've been working on a JavaScript hCard/GoogleMaps mashup (building 
on what I did for http://austin.adactio.com/) with the aim of 
releasing it for anybody to use on their site (the more tools that 
encourage people to use microformats, the better). I want it to be 
modular so that people can have more than one map per page. To do 
this, the script currently takes a single required argument: the ID 
of a containing element for a series of hCards.
Here's a working demo of what I've got so far:
http://2006.dconstruct.org/location/
The JavaScript is here:
http://2006.dconstruct.org/scripts/map.js
Unfortunately, it isn't quite as simple as "add this script tag to 
your document" for anybody to use this: the Google Maps API demands 
that each domain has their own API key so anyone who would want to 
use this would have to go off to Google first (register if they don't 
yet have an account), and request an API key. That's a few too many 
hoops to jump through. :-(
But anyway, back to the topic at hand...
> When you mark up people/companies as hCards or hCalendar events or 
> hReviews,
> along with other things on a single page, try using an "id" 
> attribute on the
> root element (the element with class="vcard" etc.) and report back 
> how ti
> works with you.
>> If this works for folks, I'll add it to hcard-authoring as a 
> recommended
> good practice.

Regardless of my wish for an ID on the über-element containing the 
hCards/hCalendars/hReviews, the idea of associating unique a ID with 
a specific microformat chunk sounds like a good one to me.
If a convention arose for people to mark up their own hCard with 
something like id="author" or id="me", then it would be easier for 
people to build/use tools to extract just that single hCard, leaving 
any others on the page alone if desired.
Perhaps this is something that could also be recommended as a best 
practice... if enough people start doing it, that is.
Bye,
Jeremy
-- 
Jeremy Keith
a d a c t i o
http://adactio.com/


More information about the microformats-discuss mailing list

AltStyle によって変換されたページ (->オリジナル) /