[uf-discuss] Canonical hCards (was: Search on CSS element)
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:
> 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 
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>
- 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"
- the consumer reads this page
("http://theryanking.com/blog/contact/") and finds the canonical hCard
at id "vcard"
- 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  (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.
More information about the microformats-discuss