[uf-discuss] Simplifying hierarchy in hCard
chris.messina at gmail.com
Wed Mar 29 12:40:43 PST 2006
Actually, I've wondered this myself and think that people will
actually do this regardless...
So while I take your point Tantek, I think allowing this actually
makes sense. Parsers should treat combined microformats and objects as
non-nested objects... basically the equivalent behavior of shorthand
background: url(image.gif) no-repeat #fff;
<span class="author vcard fn">My Name</span>
would be the equivalent of
<span class="author vcard"><span class="fn">My Name</span></span>
...except that it wouldn't be nestable.
This saves a bunch of code and writing and makes for a more elegant
I've tried using hcards in my blog posts and it's just a ton to write
out (with or without widgets). Ideally, this is how I could do the
hcard thing in a post:
<a class="vcard fn url" rel="met friend contact"
That's the use case that I would design this for. Since you can't nest
anchors anyway, this seems the ideal application of this concept.
On 3/29/06, Tantek Çelik <tantek at cs.stanford.edu> wrote:
> On 3/29/06 3:14 AM, "David Janes -- BlogMatrix" <davidjanes at blogmatrix.com>
> > From the hatom-issues  discussion, Tantek writes:
> > | You can actually simplify that (one fewer span) with:
> > | <span class="author vcard"><span class="fn">My Name</span></span>
> > Why shouldn't hCard support <span class="author vcard fn">My
> > Name</span>? I.e. do we gain anything by that extra layer of hierarchy
> > of spans?
> David, this has been asked (at least once) before on the list (we should
> probably add this to the microformats FAQ and/or the hCard FAQ ), and
> the short answer is, it breaks the ability to nest microformats. E.g. even
> with just hCard, we can put an hCard inside another hCard as its AGENT, and
> that becomes impossible to parse if you collapse a property element (such as
> fn) with the root class name element (vcard) itself, because then it becomes
> ambiguous which hCard the "fn" applies to (the outer hCard, or the "agent"
> In short, properties of a microformat MUST go in descendant elements
> *inside* the root class element of that microformat. Similarly with
> subproperties of a property (e.g. "region" must be on a descendant of
>  http://microformats.org/wiki/faq
>  http://microformats.org/wiki/hcard-faq
> microformats-discuss mailing list
> microformats-discuss at microformats.org
More information about the microformats-discuss