[uf-discuss] "authoritative hCards", a simpler proposl

David Janes davidjanes at blogmatrix.com
Thu Feb 8 23:01:10 PST 2007

On 2/8/07, Ryan King <ryan at technorati.com> wrote:
> I propose that this is a simpler solution which will work better.
> Also, the algorithm for finding the most authoritative hCard:
> 1. if no uid or uid == the uid from the previous iteration/recursion
> => you're done
> 2. if url == uid and there's an hCard at that url, recurse with the
> new hCard

Here's my January 24 problem (re)statement, rewritten with Ryan's proposal.

(a) Start Source Page (e.g. http://microformats.org/)

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

The "url uid" indicates that the consumer should dereference to
"http://theryanking.com" (Rule #2)

(b) URL Page (http://theryanking.com):

Ryan changes:

<a href="http://theryanking.com/blog/contact/" title="contact">contact</a></li>


<div class="vcard">
 Contact <a class="url fn uid"
href="http://theryanking.com/contact/#vcard">Ryan King</a>

The "url uid" indicates that the consumer should dereference to
"http://theryanking.com/contact/#vcard" (Rule #2).

- we have to use a heuristic to join Step (a) & (b). I don't think
this is avoidable

Authorative URL Page (http://theryanking.com/blog/contact/#vcard):

<div class="vcard" id="vcard">
 <a class="url fn uid" href="http://theryanking.com">Ryan King</a>
 ... more stuff ...

Rule #1 stops iteration (uid=http://theryanking.com, which is the uid
from step (b)).


This works pretty good. Two potential changes.

Rule 1. if no uid or uid == the uid from _a_ previous
iteration/recursion => you're done

change _the_ -> _a_: no need to go around in circles

Rule 0. if this is the first hCard you've seen, and there is a url but
no uid, the consumer may dereference once

+ works with what's out there
- asking consumers to do potentially unnecessary work

Regards, etc...

David Janes
Founder, BlogMatrix

More information about the microformats-discuss mailing list