[uf-discuss] Canonical hCards (was: Search on CSS element)

David Janes davidjanes at blogmatrix.com
Tue Jan 23 13:05:28 PST 2007


On 1/23/07, Tantek Çelik <tantek at cs.stanford.edu> wrote:
> David Janes, you're right, we need to solve this problem.
>
> I did some research on examples in the wild and possible approaches here:
>
> <http://microformats.org/wiki/hcard-brainstorming#hCard_to_hCard_relationshi
> ps>
>
> Please take a look and add your thoughts on the problem-space and/or
> examples you have found in the wild for each type of "canonicalization"
> (there are more than one).

Well, strangely enough I do have ideas in this area. I'm going to
outline them here and move them into the wiki tomorrow, in case
there's interesting discussion.

My starting assumptions are:

- no changes should be needed to a hCard that has a "url"
- hinting is allowed, but not needed
- we follow the OpenID model of indirection [1]

The idea works like this:

- a consumer sees a hcard, say

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

- the consumer looks at "http://theryanking.com"

- if the consumer sees a <link> element like the following, it knows
there is a canonical hCard. The title must be the same as the "fn" (?)

<link rel="identity.hcard" title="Ryan"
href="http://theryanking.com/blog/contact/#vcard" />

- the consumer reads this page
("http://theryanking.com/blog/contact/") and finds the canonical hCard
at id "vcard"

Notes:
- if the non-canonical hCard url has a fragment and that points to a
hCard, assume we are done
- if there is no fragment in the non-canonical hCard url, a <link> is required
- if the link does not have a fragment, the first hCard on the page is
the one we use
- I've documented this here [2] (but discuss here please)
- we could add an extra class element, say "canonical" that could be
used in conjuction with the url to guarentee there is a canonical
hCard to be found; I'm not really sure if this is necessary though.

Regards, etc...
David

[1] http://blogmatrix.blogmatrix.com/:entry:blogmatrix-2006-09-12-0001/
[2] http://blogmatrix.blogmatrix.com/:entry:blogmatrix-2006-09-12-0003/

-- 
David Janes
Founder, BlogMatrix
http://www.blogmatrix.com
http://blogmatrix.blogmatrix.com



More information about the microformats-discuss mailing list