[uf-discuss] Going from XFN to hCard

Martin Atkins mart at degeneration.co.uk
Sat Nov 15 19:27:35 PST 2008


Tantek Celik wrote:
> http://microformats.org/wiki/representative-hcard
> 

Thanks for the pointer. The representative-hcard-authoring page shows 
how to create an hCard that links to the page it represents. I've posted 
on the representative-hcard-brainstorming page a complimentary proposal 
for the opposite link from the page to the hCard. I'll also include it 
below...

------------------

First add an id attribute to the element that carries the "vcard" class.

Then either publish this in the HEAD section of the page:

<link rel="me" href="#some_element_id" title="Contact Information" >

or publish this in the BODY of the page:

<a rel="me" href="#some_element_id">Contact Information</a>

Borrows the semantics of XFN's "me" relationship, saying "this element 
represents the same person as this page". Allows the page to link to the 
hcard rather than the other way around.

Can in theory be used to say that an hcard on a completely different 
page is the representative hcard for this page. Could be useful to avoid 
duplicating information if, for example, the site already has a "Contact 
Me" page:

<a rel="me" href="/contact.html#contactinfo">Contact Me</a>

The above doesn't necessarily imply that contact.html itself represents 
the same person as this page. contact.html might itself be about 
contacting several different people or departments.

If the hcard is indeed on a different page, it can reciprocate the link 
by linking back from within the hCard, ideally within the hCard "url" 
field. If the hCard is on the page it represents, this reciprocal link 
is implied. rel="me" should not be included on this link unless the page 
containing the hcard represents the same person as the target of the 
link, to avoid confusing XFN-only (i.e. non-hCard) parsers.

------------------

Thanks,
Martin


More information about the microformats-discuss mailing list