[microformats-discuss] XHTML "id" attribute and microformats, particularly hCard

David Janes -- BlogMatrix davidjanes at blogmatrix.com
Sun Oct 16 10:40:30 PDT 2005

I'm thinking off the "id" field as something really quite independent of 
the UID, or in fact, really of hCard (and also hCalendar, and probably 
other microformats in the future). It's meaning is functional -- it 
allows us to address data on the internet by the HTTP protocol, that is, 
by a URL (as opposed to a URN, which is more how the UID would function)

I had a slight Eureka moment a few minutes ago (and I was in the bath 
too!): "rel-<microformatname>". Once we have URLs to address hCards and 
hCalendars, we can write fun (entirely hypothetical) things in our blogs:

Next week I'm going to <a rel="vcalendar" 
href="http://eventful.com/events/E0-001-000439889-6">Tag Camp</a> and 
I'm going to meet <a rel="vcard" 
href="http://www.ndunn.com/2005/10/7/hCard#NeilDunnHCard">Neil Dunn</a>.

Another application relates to the hAtom thingie I'm working on. If you 
look at the microformats blog, you'll see that the authors of each blog 
post have little hCards attached that are really not that useful.

But changing:

<address class="vcard"><a class="url fn" 
href="http://theryanking.com">Ryan King</a></address>


<address><a rel="vcard" 
href="http://theryanking.com/blog/contact/#myvcard">Ryan King</a></address>

opens up a world of possibilities.

Regards, etc...

Brian Suda wrote:
> There are several pros and cons to this. vCard has a UID field, and
> originally we planned on using the ID arrtbute to populate that
> property. The problem is that an HTML ID attribute is unique only
> loacally to the page, whereas UID is suppost to be globally unique.
> The problem would arrise when you extracted JohnDoe #1's hCard, then
> later extracted someone else by the same name John Doe #2, the IDs
> would be in conflict.
> That is why hCard/hCal do NOT use them in the conversion to their
> vCard/iCal counterparts.
> That said, in X2V they ARE used. If you want to extract all the vCards
> from a page, you pass the webservice the URL to the page. If you want
> a single person/event from that page you can pass the page and anchor
> (page#anchor). X2V will then only extract the data that are children
> of that anchor
> So if your page http://www.ndunn.com/2005/10/7/hCard has several
> hCards and you only wanted to extract one you could pass this link
> instead: http://www.ndunn.com/2005/10/7/hCard#NeilDunnHCard
> What you are proposing is already in place, maybe not in the spec, but
> in the software. I'll have to look into why it is not mentioned, and
> possibly adding to the wiki.
> -

More information about the microformats-discuss mailing list