[uf-new] hAudio ITEM/TRACK debate resolution
Manu Sporny
msporny at digitalbazaar.com
Sun Oct 21 09:30:27 PDT 2007
Martin McEvoy wrote:
> Could It be done Like this?
>
> <div class="haudio">
> <div class="item">
> <span class="type" title="Release">
> <span class="fn">Best Before 1984</span>
> </span>
> By: <span class="contributor">Crass</span>
> </div>
> <div class="item">
> <span class="fn">Nagasaki Nightmare</span>
> <span class="duration">4:46</span>
> </div>
> <div class="item">
> <span class="fn">Big A, Little A</span>
> <span class="duration">6:13</span>
> </div>
> </div>
>
> type titles can be Album, Release, Podcast, Chart, Toplist, even Episode
> and Track but would this be too restrictive? I think It may be a more
> flexible approach than having class names for all these properties.
While I am a fan of doing it this way, it goes against one of the
primary Microformat principles: "No hidden data!"
This is one of the main things that separate the Microformats approach
from the RDFa approach. hAudio in RDFa[1] would mark up the previous
example like so:
<div about="#best-before-1984" instanceof="hmedia:Album">
<span property="dc:title">Best Before 1984</span>
By: <span property="dc:contributor">Crass</span>
</div>
...
<span about="#best-before-1984" rel="hmedia:contains"
resource="#nagasaki-nightmare">
<div about="#nagasaki-nightmare" instanceof="hmedia:Recording">
<span property="dc:title">Nagasaki Nightmare</span>
<span property="hmedia:duration" content="PT4M46S">4:46</span>
</div>
</span>
...
<span about="#best-before-1984" rel="hmedia:contains"
resource="#big-a-little-a">
<div about="#big-a-little-a" instanceof="hmedia:Recording">
<span property="dc:title">Big A, Little A</span>
<span property="dc:duration" content="PT6M13S">6:13</span>
</div>
</span>
Note that with the RDFa approach:
- The type is explicitly stated using @instanceof.
- There is slightly more hidden data with the RDFa approach.
- RDFa is more verbose.
- There is no need for nesting in RDFa to express containment.
- Items can be related to one another without nesting in RDFa.
So, while it is a good argument, Martin... it is an argument for RDFa,
not an argument for the Microformats community.
The closest we can get to specifying type in the Microformats community
is by either:
a) explicitly stating it, which we can't do with hAudio, or
b) implicitly stating it, which is why we have ALBUM
-- manu
[1] http://wiki.digitalbazaar.com/en/HAudio_RDFa
More information about the microformats-new
mailing list