[uf-new] PROPOSAL: Replace hAudio FN with TITLE

Manu Sporny msporny at digitalbazaar.com
Thu Feb 14 21:24:40 PST 2008


Tim White wrote:
> I don't write parsers or pretend to know how to, but... 

Then let me help by underscoring your point, which is an excellent one.
I DO write parsers[1] and have quite a bit of experience in reading
standards and implementing them in code.

> (yes, here I go again) it seems to me that if you have this:
> 
> <div class="hAudio">
> <span class="title">Name of Album</span>
> <div class="vcard">
> <span class="fn">Bob</span>, <span class="title">Composer</span>
> </div> <!-- end vcard -->
> </div><!-- end haudio -->
> 
> the parser should be able to determine that the "title" contained
> directly inside "haudio" is an album name and that the "title" nested
> inside "vcard" inside "haudio" belongs to the vcard and not haudio.

Yes, you are correct. Usually, each Microformat states how this should
be handled. So far, the general parsing rule has been "use whatever
value you hit first if the Microformat can only have one value for the
given property". While the example above shows it going right, the
example below shows how it can go wrong:

<div class="haudio">
 <div class="vcard">
  The <span class="title">Composer</span> named
  <span class="fn">Bob</span> created
  <span class="title">Awesome Song</span>
 </div> <!-- end vcard -->
</div> <!-- end haudio -->

Which gives this:

haudio title "Composer" .
vcard fn "Bob" ;
      title "Composer" .

Every time you overlap two Microformats that share a common property,
you could have this issue. That shouldn't scare us off from re-using
common properties, though!

> I'm sure cases exist (or could exist) where it won't be this simple,
> but shouldn't this cover the 80%?

Yes, you are correct. There are cases that exist that could mess up the
data that you're generating, but that's the trade-off that Microformats
took a long time ago (and it's a good trade-off, IMHO).

> Certainly if we agree that microformats are a way to extend meaning to
> content, TITLE is much more meaningful (and easier for authors to
> adopt) than FN.

So, does that mean you're a +1 for using TITLE over FN in hAudio as well?

-- manu

[1] http://rdfa.digitalbazaar.com/librdfa/



More information about the microformats-new mailing list