[uf-discuss] Comments from IBM/Lotus rep about Microformats

Andy Mabbett andy at pigsonthewing.org.uk
Sat Dec 9 03:47:47 PST 2006


In message
<14596d040612090133u144da4det108f8fbf8bd27ae4 at mail.gmail.com>, Tim
Hodson <hodson.tim at googlemail.com> writes

>A parser could easily identify child relationships within
>the HTML and extrapolate.
>
>Granted this wouldn't be so easy if two microformats were muddled
>together on the same page.

AIUI the concerns are about using the same class-name for two different
attributes. Say, the title of a book in a citation, vs. a job title in
an hCard.

Since a citation may include the author's hCard, it is thought that
there might be a conflict:

        <div class="citation">
         <span class="title">
                Running an ISP for Idiots
         </span>
         <div class="author"
          <div class="vcard">
           <span class="title">
                Internet Expert [1]
           </span>
          <div>
         <div>
        <div>

There is a danger that "Internet Expert" might be recorded as the title
of the book (especially if the other title attribute is not present)

Several possible solutions are available to us:

   1    Declare that, if the attribute is inside a microformat (in this
        case hCard), then it always applies to that uF, but not the
        parent uF (in this case the citation)

   2    Uniquely name the first attribute as, say, class="book-title"
        (compare to some of the proposed class names in the 'species'
        proposal, which use this method to avoid other clashes).

   3    Use an additional wrapper around the hCard on an additional
        class on the hCard), to indicate that anything within that
        wrapper does not apply to the parent.

My preference is for option 2 - with hindsight, I would have named all
the classes in hCard as, say, "vcard-title".



[1] I actually knew of someone who has this as their job title ;-)

-- 
Andy Mabbett
            *  Say "NO!" to compulsory ID Cards:  <http://www.no2id.net/>
            *  Free Our Data:  <http://www.freeourdata.org.uk>
            *  Are you using Microformats, yet: <http://microformats.org/> ?


More information about the microformats-discuss mailing list