haudio: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
m (Replace <entry-title> with {{DISPLAYTITLE:}})
 
(255 intermediate revisions by 19 users not shown)
Line 1: Line 1:
<h1>hAudio 0.2</h1>
{{DISPLAYTITLE:hAudio 0.9.1}}
{{Template:DraftSpecification}}
{{TOC-right}}
http://farm2.static.flickr.com/1216/604867362_da0921136a_o.png


[[haudio|hAudio]] is a simple, open, distributed format, suitable for embedding information about audio recordings in (X)HTML, Atom, RSS, and arbitrary XML. hAudio is one of several [[microformats]] open standards.
[[haudio|hAudio]] is a simple, open, distributed format, suitable for embedding information about audio recordings in (X)HTML, Atom, RSS, and arbitrary XML. hAudio is one of several [[microformats]] open standards. This page and Microformat is in the public domain.


== hAudio Microformat Draft Specification 2007-04-18 ==
== hAudio Microformat Draft Specification ==


; Editor: [[User:ManuSporny | Manu Sporny]], [http://www.bitmunk.com/ Bitmunk] - [http://blog.digitalbazaar.com Digital Bazaar], Inc.
=== Editors ===
; Authors: [[User:ManuSporny | Manu Sporny]], [http://www.bitmunk.com/ Bitmunk] - [http://blog.digitalbazaar.com Digital Bazaar], Inc.
* [[User:ManuSporny | Manu Sporny]] ([http://www.bitmunk.com/ Bitmunk] - [http://blog.digitalbazaar.com Digital Bazaar], Inc.)
: Martin McEvoy
* [[ user:WebOrganics | Martin McEvoy ]]
: Alexandre Van De Sande
=== Authors ===
: Michael Johnson
* [[User:ManuSporny | Manu Sporny]]  
: Dave Longley
* [[ user:WebOrganics | Martin McEvoy ]]
 
=== Contributors===
[[User:ManuSporny | Manu Sporny]], [[ user:WebOrganics | Martin McEvoy ]], [[  User:AlexandreVandeSande | Alexandre Van De Sande ]], Michael Johnson, Dave Longley, Brian Suda, Ben Wiley Sittler, Scott Reynen, Frances Berriman, James Craig, David Janes, [[User:AndyMabbett|Andy Mabbett]], Danny Ayers, Rudy Desjardins, Theresa O'Connor, Ryan King, Chris Griego, Brad Hafichuk, Tantek Çelik, Colin Barrett, Joe Andrieu, Michael Smethurst, [[User:ChrisNewell | Chris Newell]], Julian Stahnke, Justin Maxwell, Paul Wilkins and David I. Lehn.


Microformats [[#Copyright]] and [[#Patents]] statements apply.
Microformats [[#Copyright]] and [[#Patents]] statements apply.
__TOC__


== Introduction ==
== Introduction ==
Line 26: Line 30:
=== Inspiration and Acknowledgments ===
=== Inspiration and Acknowledgments ===


Many thanks to the various individuals that did research and proposed ideas and discussion related to media info and audio info in general. Among the many participants are [[RodBegbie]], Dean Hudson, [http://tantek.com/log/ Tantek Çelik], [http://napsterization.org/stories/ Mary Hodder], [http://joshkinberg.com/blog/ Joshua Kinberg], ChrisMessina, and [http://onlisareinsradar.com/ Lisa Rein].
Many thanks to the various individuals that did research and proposed ideas and discussion related to media info and audio info in general. Among the many participants are [[RodBegbie]], Dean Hudson, [http://tantek.com/log/ Tantek Çelik], [http://napsterization.org/stories/ Mary Hodder], [http://joshkinberg.com/blog/ Joshua Kinberg], ChrisMessina, and [http://onlisareinsradar.com/ Lisa Rein][http://www.irstaxreliefsettlement.com .]


=== Scope ===
=== Scope ===
Line 32: Line 36:
Audio content consistently share several common fields.  Where possible hAudio has been based on this minimal common subset.
Audio content consistently share several common fields.  Where possible hAudio has been based on this minimal common subset.


==== Out of scope ====
=== Out of scope ===


Fields that are type-specific have been omitted from hAudio.  It is important that hAudio be kept simple and minimal from the start.  Additional features can be added as deemed necessary by practical implementation experience.
Fields that are type-specific have been omitted from hAudio.  It is important that hAudio be kept simple and minimal from the start.  Additional features can be added as deemed necessary by practical implementation experience.
Line 38: Line 42:
The concept of a universal audio identifier, that is, how to identify the same audio album, song, speech, or podcast across different music and audio sites, though something very useful to have, is outside the scope of this format.
The concept of a universal audio identifier, that is, how to identify the same audio album, song, speech, or podcast across different music and audio sites, though something very useful to have, is outside the scope of this format.


== Semantic XHTML Design Principles ==
== Format ==
 
{{semantic-xhtml-design-principles}}


== Format ==
{{rfc-2119-intro}}


=== In General ===
=== In General ===
Line 52: Line 54:


* hAudio ('''<code>haudio</code>''')
* hAudio ('''<code>haudio</code>''')
** '''work-title'''. required. text.
** '''fn''' or/and '''album''' required. text.
** '''contributor'''. optional. using [[hCard]].
** '''contributor'''. optional. using text or [[hCard]].
*** suggested ''''role''''s: speaker, artist, composer, band, publisher
** '''duration'''. optional. ISO-8601 time duration. (re-used from [[hcalendar]]).
** '''published-date'''. optional. using [[datetime-design-pattern]].
** '''item''' optional. using text or multiple properties from [[hAudio]].
** '''sample'''. optional. using [[rel-design-pattern]] with <code>sample</code> as the <code>mf-rel-value</code>.
** '''position''' optional. text.
** '''acquire'''. optional. using URL.
** '''image-summary'''. optional. using HTML and XHTML tag <code>img</code>.
** '''category'''. optional. text.
** '''category'''. optional. text.
** '''duration'''. optional. ISO-8601 time duration using [[abbr-design-pattern]].
** '''published'''. optional.
** '''price'''. optional. using [[currency-proposal]].
** '''photo'''. optional. using any element containing a URL, such as IMG.
 
** '''description''' optional. text.
'''tracks''', '''songs''', and '''parts''' in general are specified by embedding hAudio's inside of hAudios and using the ideas put forth in [[grouping-brainstorming]] and [[grouping-proposal]]. Defining parts of an hAudio will not be complete without a complete grouping draft/specification.
** '''sample''' (rel). optional. sample file/stream using [[rel-design-pattern]] with <code>sample</code> as the <code>mf-rel-value</code>.
** '''enclosure''' (rel). optional. full download of file using [[rel-enclosure]].
** '''payment''' (rel). optional. link to purchase process using [[rel-payment]].
** '''price''' optional. Using the sub properties '''currency''' and '''amount'''.


=== Field details ===
=== Field details ===
Line 71: Line 74:
==== hAudio ====
==== hAudio ====


An hAudio is used to identify and describe metadata associated with a particular audio recording.
An hAudio is used to identify and describe metadata associated with an audio recording.


* an hAudio element is identified by class name <code>haudio</code>
* an hAudio element is identified by class name <code>haudio</code>
* hAudio content may contain other hAudios. This is most prevalent when describing Audio Albums. The outermost container is an hAudio describing an album, while the inner hAudios are the tracks in the album.


==== Work Title ====
==== fn ====
 
The name of a single audio recording is a short textual description used to identify the work among interested parties. This can be the name of a speech, song name, or short description regarding a sound effect.
 
* The element is identified by the class name <code>fn</code>.
* hAudio {{must}} have <code>fn</code> or/and  <code>album</code>.
 
==== Album ====
 
The title of a collection of audio recordings, such as those that are represented as a CD, album or LP. The text should be a short textual description used to identify the work among interested parties.
 
* The element is identified by the class name <code>album</code>.
* hAudio {{must}} have either <code>album</code> or <code>fn</code> or both.
 
==== Item ====
 
A container for another hAudio item, which MUST be considered a part of the parent audio recording. An example of an item that is part of an hAudio would be a track in an audio album, a aria in an Opera, or a section of a podcast.
 
* The element is identified by the class name <code>item</code>.
* hAudio {{may}} have one or more items.
* The element {{must}} be processed opaquely. No sub-elements should be read from any hAudio contained in a track element.
* The contents of the element {{must}} be marked up using properties in hAudio.
 
==== Position ====


A Work Title is a short textual description used to identify an audio recording among interested parties. This can be the title of a speech, album title, song title, or short description regarding a sound effect.
The position is used to describe the position of the hAudio item in a list. Examples of hAudio lists can include album track listings, music top 10 lists, playlists, and podcast chapters.


* The element is identified by the class name <code>work-title</code>.
* The element is identified by the class name <code>position</code>.
* hAudio MUST have a Work Title.
* hAudio {{may}} include one <code>position</code> element.
* The contents of the element {{must}} be a number or other sequential identifier.
* The sequential identifier {{may}} be specified out-of-sequence.  


==== Contributor ====
==== Contributor ====


A Contributor is any entity that takes part in the creation and distribution of an audio recording. Examples include: artist, publisher, guitarist, vocalist, violinist, lead singer, backup singer, bassist, drummer, manager, and roadie.
A Contributor is any entity that takes part in the creation and distribution of an audio recording. Examples include: artist, composer, publisher, guitarist, vocalist, violinist, lead singer, backup singer, bassist, drummer, manager, and roadie.


* The element is identified by the class name <code>contributor</code>.
* The element is identified by the class name <code>contributor</code>.
* hAudio MAY include one or more contributors.
* hAudio {{may}} include one or more contributors.
* The contents of the element must include a valid [[hCard]] Microformat.
* The contributor's name SHOULD also be marked up as a valid hCard Microformat. [[hcard]]
* The <code>role</code> field should be used to specify the Contributor's responsibility related to the audio recording.
*# The <code>role</code> attribute {{should}} be used to specify the contributor's responsibility related to the audio recording if hCard is utilized.
* If multiple Contributors are specified without <code>role</code> specifications, it may be assumed that the first role mentioned is the creator.
* The contributor's name {{may}} be specified in plain-text without being enclosed in a hCard Microformat.


==== Published Date ====
==== Published ====


The Published Date specifies the date that the audio recording was made available to the public. Examples include: The airing date of a radio broadcast, the day a speech was given, or the day a music album was made available for sale.
The published date specifies the date that the audio recording was made available to the public. Examples include: The airing date of a radio broadcast, the day a speech was given, or the day a music album was made available for sale.


* The element is identified by the class name <code>published-date</code>.
* The element is identified by the class name <code>published</code>.
* hAudio MAY include one or more <code>published-date</code>s.
* hAudio {{may}} include one or more <code>published</code> elements.
* The contents of the element must include a date format compliant with the [[datetime-design-pattern]].
* The contents of the element {{may}} include a date format compliant with the [[datetime-design-pattern]].


==== Sample ====
==== Sample ====


A Sample URL specifies from where an excerpt of the audio recording may be retrieved.  
A Sample URI specifies from where an excerpt of the audio recording may be retrieved.


* The element is identified by a URL fitting the [[rel-design-pattern]], the rel content being <code>sample</code>.
* The element is identified by a URI fitting the [[rel-design-pattern]], the rel content being <code>sample</code>.
* hAudio MAY include one or more URL <code>sample</code>s.
* hAudio {{may}} include one or more URI <code>sample</code>s.
* The URL SHOULD point to a directly accessible stream or file.
* The URI {{should}} point to a directly accessible stream or file.
* The type of the sample MAY be specified by using the <code>type</code> specifier for a URL.
* The type of the sample {{may}} be specified by using the <code>type</code> specifier for a URI.


==== Acquire ====
==== Full Download (Enclosure) ====


An Acquire URL specifies from where the full version of an audio recording may be retrieved. The URL can point to a process required (such as purchasing) that must be completed to acquire the audio recording.
A Full Download URI specifies from where the full version of an audio recording may be retrieved. The URI {{must}} point to a direct link to a file retrieval process (FTP, HTTP, BitTorrent URI, etc).


* The element is identified by a URL with the class name as <code>acquire</code>.
* The element is identified by a URI fitting the [[rel-design-pattern]], the rel content being <code>enclosure</code>.
* hAudio MAY include one or more <code>acquire</code> URLs.
* hAudio {{may}} include one or more <code>enclosure</code> URIs.
* The type of the file MAY be specified by using the <code>type</code> specifier for a URL.
* The type of the file {{should}} be specified by using the <code>type</code> specifier for a URI.


==== Image Summary ====
==== Purchase (Payment) ====


An Image Summary specifies an image that should be used to summarize the audio recording. Examples include: the image of a speaker, an audio album cover image, and a picture from a concert.
A Purchase URI specifies from where the full version of an audio recording may be purchased. The URI {{must}} point to the beginning of a purchase process for the hAudio.


* The element is identified by the class name <code>image-summary</code>.
* The element is identified by a URI fitting the [[rel-design-pattern]], the rel content being <code>payment</code>.
* hAudio MAY include one or more <code>image-summary</code> images.
* hAudio {{may}} include one or more <code>payment</code> URIs.
* The contents of the element must be wrapped in the &lt;img&gt; tag.
* The type of the file {{may}} be specified by using the <code>type</code> specifier for a URI.


==== Genre ====
==== Photo ====


The Genre specifies the category used to classify the audio recording. Examples include: blues, rock, motivational, spoken word, or sound effect.
A photo specifies an image that should be used to summarize the audio recording. Examples include: the image of a speaker, an audio album cover image, or a picture from a concert.


* The element is identified by the class name <code>genre</code>.
* The element is identified by the class name <code>photo</code>.
* hAudio MAY include one or more <code>genre</code>s.
* hAudio {{may}} include one or more <code>photo</code> elements.
* The element {{should}} use an &lt;img&gt; element.
* The element {{may}} use any other element that contains a URL, such as &lt;a&gt; or &lt;object&gt;, but it is not recommended.


==== Length ====
==== Category ====


The Length specifies the length of the audio recording in seconds. Examples include: 104 seconds, 3:23, and 4 minutes.
The Category specifies the genre or style used to classify the audio recording. Examples include: blues, rock, motivational, spoken word, or sound effect.


* The element is identified by the class name <code>length</code>.
* The element is identified by the class name <code>category</code>.
* hAudio MAY include one <code>length</code> element.
* hAudio {{may}} include one or more <code>category</code> elements.
* The contents of the element SHOULD use the [[abbr-design-pattern]].
* This element {{may}} be expressed using the [[rel-tag]] elemental microformat. When a category is expressed using rel-tag, the content of the element is used as the text for the category. For example: <code><a class="category" rel="tag" href="/tags/symphony">Symphonic</a></code> would have "Symphonic" as the text for the category.
 
==== Duration ====
 
The Duration specifies the length in time of the audio recording. Examples include: 104 seconds, 3:23, and 4 minutes.
 
* The element is identified by the class name <code>duration</code>.
* hAudio {{may}} include one <code>duration</code> element.
* The contents of the element {{may}} use the [[abbr-design-pattern]] whose title attribute contains an ISO-8601 formatted duration. An example of 3:23 (i.e 3 minutes 23 seconds) would be "PT3M23S" in ISO 8601 format.
* The element {{may}} contain the following sub properties:
** '''h''' Hour.
** '''min''' Minute.
** '''s''' Second.
Example:
<pre><span class="duration">
<span class="h">1</span>:
<span class="min">3</span>:
<span class="s">23</span>
</span></pre>


==== Price ====
==== Price ====


The Price specifies the amount of currency that must be exchanged for acquisition of a full specimen of the audio recording. Examples include: One Dollar, $2, and £4.
The Price specifies the amount of currency that must be exchanged for acquisition of a full specimen of the audio recording.  


* The element is identified by the class name <code>price</code>.
* The element is identified by the class name <code>price</code>.
* hAudio MAY include one or more <code>price</code> elements.
* hAudio {{may}} include one or more <code>price</code> elements.
* The contents of the element SHOULD use the [[currency-proposal]].
* The contents of the element {{may}} also use plain text with a currency symbol.
* The contents {{may}} contain the following sub properties:
** '''currency''' an [http://en.wikipedia.org/wiki/ISO_4217#Active_codes ISO 4217] currency name.
** '''amount''' a numerical value.
Example:
<pre><span class="price">
<abbr class="currency" title="GBP">&pound;</abbr>
<span class="amount">4.99</span>
</span></pre>


==== Grouping (Albums, Songs, and Tracks) ====
==== Description ====


hAudio defines a method to specify albums, songs and tracks. The grouping and xoxo Microformats are used to provide the concept of sets, collections, groups and lists. Use of these two Microformats allow for the creation of Albums, Podcasts, Multi-part speeches, and relationships between audio recordings.
An explanation of the contents of the hAudio item. This could explain the significance of a speech, the full-text description of a sound effect, or the meaning of a song or album.


* A group is identified by using the grouping Microformat with the hAudio class.
* The element is identified by the class name <code>description</code>.
* hAudio MAY encapsulate one or more <code>haudio</code> class tags.
* hAudio {{may}} include one or more <code>description</code> elements. If more than one description element is defined, the full description for the hAudio is the concatenation, in order, of all <code>description</code> elements.
* Grouping information between hAudio is specified using the grouping Microformat (and only the grouping Microformat).
* Sets that require a particular order (aka: Lists) must use the xoxo Microformat to define that order.


=== More Semantic Equivalents ===
=== Parser Processing Notes ===
 
* It is important to understand that ITEM is an opaque element. When processing the ITEM element, none of the properties of the child hAudio should be pulled into the parent hAudio. However, it is recommended that child hAudio {{should}} inherit the following parent hAudio properties, if they are not specified on the child:
** album
** contributor
** category
** published
** photo
 
=== Semantic XHTML Design Principles ===
 
{{semantic-xhtml-design-principles}}
 
==== More Semantic Equivalents ====


For some properties there is a more semantic equivalent, and therefore they get special treatment, e.g.:  
For some properties there is a more semantic equivalent, and therefore they get special treatment, e.g.:  


* For any "url", use <code><a class="url" href="...">...</a></code> inside the element with the class name 'haudio' in hAudio.
* For "photo", use <code><img class="photo" src="..." alt="" /></code>  
* And for "image-summary", use <code><img class="image-summary" src="..." alt="Photo of ..." /></code>  
* If only 'album' is specified, then the hAudio is an album.
* If only 'fn' is specified, then the hAudio is a song, audio track, sound effect, speech, or other atomic/singular work.
* If both 'album' and 'fn' are specified, then the hAudio is a atomic/singular work that is part of an album.
** Example: <code><nowiki><span class="haudio">Side two of <span class="album">Meddle</span> opens with <span class="fn">One of These Days</span></span></nowiki></code>
* If 'fn' and one or more 'items's are specified, the hAudio is an audio recording containing multiple sections. Each item is assumed to be an hAudio that is part of the parent hAudio.  None of the 'item' properties should implicitly be added to the containing hAudio. In other words, the parser shouldn't parse the contents of the 'item' into the higher-level hAudio object.


==== Language ====
==== Language ====


* To explicitly convey the natural language that an hAudio is written in, use the standard (X)HTML 'lang' attribute on the element with class="haudio", e.g. <code>&lt;div class="haudio" lang="en"&gt; ... &lt;/div&gt;</code> If portions of an hAudio (e.g. the item name) are in a different language, use the 'lang' attribute on those portions.
* To explicitly convey the natural language that an hAudio is written in, use the standard (X)HTML 'lang' or 'xml:lang' attribute on the element with class="haudio"
* hAudio processors which need to handle the language of reviews MUST process the standard (X)HTML 'lang' attribute as specified.
**e.g. <code><nowiki><p>I like <span class="haudio" lang="de"><span class="fn">Das Lied von der Erde</span></span> best.</p></nowiki></code>
*If portions of an hAudio (e.g. the item name) are in a different language to the rest of the hAudio, use the 'lang' or 'xml:lang' attribute on those portions.
* hAudio parsers which need to handle the native language of hAudio {{must}} process the standard (X)HTML 'lang' or 'xml:lang' attribute as specified.
* hAudio parsers which need to handle native language {{may}} traverse up the DOM to discover the native language of the page and apply that to the hAudio if no other language is specified on the hAudio.
 
==== Human vs. Machine Readable ====


=== Human vs. Machine Readable ===
If an <code>&lt;abbr></code> element is used for a property, then its '<code>title</code>' attribute is used for the value of the property, instead of the contents of the element, which can then be used to provide a user-friendly alternate presentation of the value.  
If an <code>&lt;abbr></code> element is used for a property, then its '<code>title</code>' attribute is used for the value of the property, instead of the contents of the element, which can then be used to provide a user-friendly alternate presentation of the value.  


Similarly, if an <code><img /></code> element is used for one or more properties, it MUST be treated as follows:  
If an <code>&lt;a&gt;</code> element is used for one or more properties, it {{must}} be treated as follows:
# For the 'photo' property and any other property that takes a URL as its value, the <code>href="..."</code> attribute provides the property value.
# For other properties, the element's content is the value of the property.
 
If an <code>&lt;img&gt;</code> element is used for one or more properties, it {{must}} be treated as follows:
# For the 'photo' property and any other property that takes a URL as its value, the <code>src="..."</code> attribute provides the property value.
# For other properties, the <code>&lt;img></code> element's '<code>alt</code>' attribute is the value of the property.


# For the "image-summary" property and any other property that takes a URL as its value, the <code>src="..."</code> attribute provides the property value.  
If an <code>&lt;object&gt;</code> element is used for one or more properties, it {{must}} be treated as follows:
# For other properties, the <code><img /></code> element's '<code>alt</code>' attribute is the value of the property.
# For the 'photo' property and any other property that takes a URL as its value, the <code>data="..."</code> attribute provides the property value.
# For other properties, the element's content is the value of the property.


=== Notes ===
=== Notes ===
Line 182: Line 263:
This section is informative.
This section is informative.


* By marking up audio content with the hAudio microformat, the expectation is communicated that information about the content MAY be indexed.  This has no impact on the copyright of the content itself which the publisher may explicitly specify using [[rel-license]] as specified above.
* By marking up audio content with the hAudio microformat, the expectation is communicated that information about the content {{may}} be indexed.  This has no impact on the copyright of the content itself which the publisher may explicitly specify using the [[rel-license]] microformat.
* The enumerated list of item types is under development and may be extended.
* Each type may have custom hAudio fields that follow the common set.
* Additional details about a particular item should be specified with the rest of the item's info at the URL provided for the item.


== XMDP Profile ==
== XMDP Profile ==
See: [[haudio-profile]].


<pre>
== Examples ==
<dl class="profile">
 
<dt>class</dt>
This section is informative.
<dd><p>
  <a rel="help" href="http://www.w3.org/TR/html401/struct/global.html#adef-class">
  HTML4 definition of the 'class' attribute.</a>
  This meta data profile defines some 'class' attribute values (class names)
  and their meanings as suggested by a
  <a href="http://www.w3.org/TR/WD-htmllink-970328#profile">
  draft of "Hypertext Links in HTML"</a>.
  <dl>
  <dt>haudio</dt>
  <dd>
    Used to identify and describe metadata associated with a particular audio recording.
  </dd>
  <dt>work-title</dt>
  <dd>
    A short textual description used to identify an audio recording among interested parties.
  </dd>
  <dt>collaborator</dt>
  <dd>
    An entity that takes part in the creation and distribution of an audio recording.
  </dd>
  <dt>release-date</dt>
  <dd>
    The date that the audio recording was made available to the public.
  </dd>
  <dt>image-summary</dt>
  <dd>
    An image that should be used to summarize the audio recording.
  </dd>
  <dt>genre</dt>
  <dd>
    The category used to classify the audio recording.
  </dd>
  <dt>length</dt>
  <dd>
    The length of the audio recording in seconds.
  </dd>
  <dt>price</dt>
  <dd>
    The amount of currency that must be exchanged for acquisition of a full specimen of the audio recording.
  </dd>
</dd>
</dl>
</pre>


== Examples ==
Here are a few examples of text about, and links to, audio content, from real web sites, showing how they could be easily enhanced to use hAudio.
Here are a few examples of audio content from current web sites, and how they could be easily enhanced to support the hAudio audio metadata microformat.


Want to write valid [[haudio|hAudio]]?  Use the [http://microformats.org/code/haudio/creator hAudio creator] (not implemented yet) to write about audio content and publish it on your blog.
<!-- Want to write valid [[haudio|hAudio]]?  Use the [http://microformats.org/code/haudio/creator hAudio creator] (not implemented yet) to write about audio content and publish it on your blog. -->


=== Simple Song Example ===
=== Simple Song Example ===
Line 245: Line 280:
Display:
Display:


Start Wearing Purple by Gogol Bordello
(This is a live example, detectable in parsers)
 
<div class="haudio">
<span class="fn">Start Wearing Purple</span> by <span class="contributor">Gogol Bordello</span>
</div>


Microformatted XHTML:
Microformatted XHTML:
Line 251: Line 290:
<pre>
<pre>
<div class="haudio">
<div class="haudio">
   <span class="work-title">Start Wearing Purple</span> by  
   <span class="fn">Start Wearing Purple</span> by  
   <span class="collaborator hcard fn">Gogol Bordello</span>
   <span class="contributor">Gogol Bordello</span>
</div>
</div>
</pre>
</pre>


=== Speech Example ===
=== Speech Example ===
(This is a live example, detectable in parsers)
Display:
<div class="haudio">
<span class="fn">I Have a Dream</span>, a <span class="category">speech</span> by <span class="contributor"><span class="vcard"><span class="fn n"><span class="given-name">Martin</span> <span class="additional-name">Luther</span> <span class="family-name">King</span>, <span class="honorific-suffix">Jr.</span></span></span></span>
</div>
Microformatted XHTML:
<pre>
<div class="haudio">
  <span class="fn">I Have a Dream</span>, a
  <span class="category">speech</span> by
  <span class="contributor">
      <span class="vcard">
        <span class="fn n">
            <span class="given-name">Martin</span>
            <span class="additional-name">Luther</span>
            <span class="family-name">King</span>,
            <span class="honorific-suffix">Jr.</span>
        </span>
      </span>
  </span>
</div>
</pre>
Note the use of [[hcard|hCard]].
=== Song and Album Example ===
(This is a live example, detectable in parsers)


Display:
Display:


I Have a Dream, a speech by Martin Luther King Jr.
<div class="haudio">
<span class="fn">Start Wearing Purple</span> by <span class="contributor"><span class="vcard"><span class="fn org">Gogol Bordello</span></span></span> found on <span class="album">Underdog World Strike</span>
</div>


Microformatted XHTML:
Microformatted XHTML:
Line 266: Line 339:
<pre>
<pre>
<div class="haudio">
<div class="haudio">
   <span class="work-title">I Have a Dream</span>, a
   <span class="fn">Start Wearing Purple</span> by
   <span class="genre">speech</span> by
   <span class="contributor">
   <span class="collaborator hcard fn">Martin Luther King Jr.</span>
        <span class="vcard">
            <span class="fn org">Gogol Bordello</span>
        </span>
    </span>
  found on
   <span class="album">Underdog World Strike</span>
</div>
</div>
</pre>
</pre>


=== Audio Album Example ===
Note that for bands, hCard's ''[[hcard#Implied_.22organization-name.22_Optimization|Implied "organization-name" Optimization]]'' is used.


Display:
=== Complete Album Example ===


Black Horse and The Cherry Tree by KT Tunstall
An example that uses every element of hAudio:


# Black Horse & The Cherry Tree
[Image] Live Phish, Volume 15 by Phish<br/>
# One Day [Live]
Released: October 31, 2002<br/>
Acquire: Sample, Live Recording, Buy High Quality Track<br/>
Category: [http://www.example.org/tags/live live]<br/>
Duration: 145 minutes, 27 seconds<br/>
Price: $14.99<br/>
<br/>
Tracks:<br/>
1. Sanity (5:48)<br/>
2. Highway To Hell (3:39)


Microformatted XHTML:
Here is the hAudio Microformat markup:


<pre>
<pre>
<div class="haudio grouping.ktsampler">
<div class="haudio">
<span class="title">Black Horse and The Cherry Tree</span> by
  <img class="photo" src="images/live_phish_vol_15.jpg" alt="" />
<span class="collaborator hcard fn">KT Tunstall</span>
  <span class="album">Live Phish, Volume 15</span>
<ol class="xoxo">
  <span class="contributor">
  <li>
      <span class="vcard">
   <div class="haudio grouping.ktsampler.bh">
        <span class="fn org">Phish</span>
    <span class="work-title">Black Horse & The Cherry Tree</span>
      </span>
   </div>
  </span>
  </li>
  <br/>
  <li>
  Released on:
  <div class="haudio grouping.ktsampler.od">
  <abbr class="published" title="2002-10-31">October 31, 2002</abbr>
  <span class="work-title">One Day [Live]</span>
  <br/>
  Acquire:
  <a rel="sample" href="/samples/live_phish_vol_15_sample.mp3">Sample</a>,
  <a rel="enclosure" href="/live/phish_live_phish_vol_15.mp3">Live Recording</a>,
  <a rel="payment" href="/buy/phish_live_phish_vol_15">Buy High Quality Track</a>
   Category: <a class="category" rel="tag" href="http://www.example.org/tags/live">live</a>
  Duration: <abbr class="duration" title="PT145M27S">145 minutes, 27 seconds</abbr>
  Price: <div class="price"><abbr class="currency" title="USD">$</abbr><span class="amount">14.99</span></div>
  Tracks:
   <div class="item">
      <span class="position">1</span>.
      <span class="fn">Sanity</span>
      (<abbr class="duration" title="PT5M48S">5:48</abbr>)
    </div>
    <div class="item">
    <span class="position">2</span>.
    <span class="fn">Highway To Hell</span>  
    (<abbr class="duration" title="PT3M39S">3:39</abbr>)
   </div>
   </div>
  </li>
</ol>
</div>
</div>
</pre>
</pre>


=== Podcast Example ===
=== Multi-part Podcast Example ===


Display:
DigitalPlanet Podcast: 29 Oct 07


BBC Today Podcasts for Saturday, 28 April 2007.
Forensic computing: is it really possible to delete data from your machine? Grand plans for getting broadband into Africa, checking out the sky at night via the internet and answering your emails to the programme.


* 8.10 Interview - Nottingham has become pivotal in the local elections.
Download MP3
** [http://downloads.bbc.co.uk/rmhttp/downloadtrial/radio4/today/today_20070428-0810_40_st.mp3 Download 8.10 Interview]
** [http://downloads.bbc.co.uk/rmhttp/downloadtrial/radio4/today/rss.xml Add to RSS]
* The Today Lead Interviews - The Today Programme morning briefing, ten to eight and half past eight interviews.
** [http://downloads.bbc.co.uk/rmhttp/downloadtrial/radio4/todayleadscombined/todayleadscombined_20070428-0900_40_st.mp3 Download the Today Lead Interviews]
** [http://downloads.bbc.co.uk/rmhttp/downloadtrial/radio4/today/rss.xml Add to RSS]
* BBC Radio NewsPod - Daily programme highlights from across BBC Radio News.
** [http://downloads.bbc.co.uk/rmhttp/downloadtrial/radionews/bbcradionewspod/bbcradionewspod_20070427-1800_40_st.mp3 Download BBC Radio NewsPod]
** [http://downloads.bbc.co.uk/rmhttp/downloadtrial/radio4/today/rss.xml Add to RSS]
 
Microformatted XHTML:


<pre>
<pre>
<div class="haudio grouping.today-podcast">
<div class="haudio">
<span class="work-title">BBC Today Podcasts</span> for
<p>
<abbr class="release-date" title="20070428">Saturday, 28 April 2007</span>.
  <span class="fn">DigitalPlanet Podcast</span>
  :
  <abbr class="published" title="20071029">29 Oct 07</abbr>
</p>
<p>
  <div class="item">
      <span class="fn">Forensic computing: is it really possible to delete data from your machine?</span>
  </div>
  <div class="item">
      <span class="fn">Grand plans for getting broadband into Africa</span>
  </div>
  ,  
  <div class="item">
      <span class="fn">checking out the sky at night via the internet</span>
  </div>
  and
  <div class="item">
      <span class="fn">answering your emails</span>
  </div>
  to the programme.
</p>
<p>
  <a rel="enclosure" href="/download/episode/DigitalPlanet-2007-10-29">Download MP3</a>
</p>
</div>
</div>
</pre>
=== Opera Example ===


<ul>
(This is a live example, detectable in parsers)
<li>
 
  <div class="haudio grouping.today-podcast.810-interview">
<div class="haudio" lang="en">
  <span class="work-title">8.10 Interview</span> -
<span class="fn" lang="fr">La Bohème</span> is an <span class="category">opera</span> in four acts by <span class="contributor" lang="it">Giacomo Puccini</span> to an <span class="category">Italian liberetto</span> by <span class="contributor" lang="it">Luigi Illica</span> and <span class="contributor" lang="it">Giuseppe Giacosais</span>. I saw it performed last week and found <span class="item"> <span class="fn">Act III</span> to be pretty interesting, especially the <span class="item"> "<span class="fn" lang="it">Sa dirmi, scusi</span>"</span> and <span class="item">"<span class="fn" lang="it">O buon Marcello, aiuto!</span>"</span> arias.</span>
  Nottingham has become pivotal in the local elections.
</div>
  <ul>
    <li><a class="acquire" href="http://downloads.bbc...-0810_40_st.mp3">Download 8.10 Interview</a></li>
    <li><a href="http://downloads.bbc...today/rss.xml">Add to RSS</a>
  </ul>
  </div>
</li>
<li>
  <div class="haudio grouping.today-podcast.the-today-lead-interviews">
  <span class="work-title">The Today Lead Interviews</span> -
  The Today Programme morning briefing, ten to eight and half past eight interviews.
  <ul>
    <li><a class="acquire" href="http://downloads.bbc...-0900_40_st.mp3">Download the Today Lead Interviews</a></li>
    <li><a href="http://downloads.bbc...today/rss.xml">Add to RSS</a>
  </ul>
  </div>
</li>
<li>
  <div class="haudio grouping.today-podcast.bbc-radio-newspod">
  <span class="work-title">BBC Radio NewsPod</span> -
  Daily programme highlights from across BBC Radio News.
  <ul>
    <li><a class="acquire" href="http://downloads.bbc...-1800_40_st.mp3">Download BBC Radio NewsPod</a></li>
    <li><a href="http://downloads.bbc...today/rss.xml">Add to RSS</a>
  </ul>
  </div>
</li>
</ul>
</pre>


=== Complex hAudio Example ===


'''NEED AN EXAMPLE'''
<pre>
<div class="haudio" lang="en">
  <span class="fn" lang="fr">La Bohème</span>
  is an
  <span class="category">opera</span>
  in four acts by
  <span class="contributor" lang="it">Giacomo Puccini</span>
  to an
  <span class="category">Italian liberetto</span>
  by
  <span class="contributor" lang="it">Luigi Illica</span>
  and
  <span class="contributor" lang="it">Giuseppe Giacosais</span>.
  I saw it performed last week and found
  <span class="item">
      <span class="fn">Act III</span>
      to be pretty interesting, especially the
      <span class="item">
        "<span class="fn" lang="it">Sa dirmi, scusi</span>"
      </span>
      and
      <span class="item">
        "<span class="fn" lang="it">O buon Marcello, aiuto!</span>"
      </span>
      arias.
  </span>
</div>
</pre>


== Examples in the wild ==
== Examples in the wild ==


This section is '''informative'''.
This section is '''informative'''.
* [http://en.wikipedia.org/wiki/Category:Articles_with_hAudio_microformats Wikipedia] has 119,555 songs and albums marked up in hAudio format.
* [http://weborganics.co.uk/haudio-rss/ hAudio-RSS] uses hAudio 0.9.1 and XSLT to generate an RSS2 Playlist.
* Tara Hunt of [http://openmediaweb.org/index.php/2008/01/13/publishing-my-workout-music-in-haudio/ Open Media Web] Published her workout Music in hAudio
* Grabb.it The web music player now uses hAudio 0.9 in its [http://grabb.it/users/greg user pages]
* [http://soundcloud.com/ SoundCloud] has hAudio in its pages.
* [http://populizer.com/ Populizer] also has hAudio in its pages.
* The [http://www.numblog.de/ New Urban Music Blog] has hAudio marked up in its pages.
* [http://alpha.libre.fm/ Libre.fm] has marked up on all its user pages in hAudio see : [http://alpha.libre.fm/user/weborganics example]


== Implementations ==
== Implementations ==
This section is '''informative'''.  
This section is '''informative'''.  


See [[haudio-implementations|hAudio Implementations]].
*[http://weborganics.co.uk/files/js/haudio.js hAudio 0.9 script] for [[operator|Operator]], updated version of the original hAudio script by David Lehn.
* Matthias Pfefferle has made some [http://notizblog.org/projects/haudio-icons/ hAudio Icons]
* [http://microform.at/ Microformat TransFormr] extracts hAudio 0.9.1 as a RSS2 Podcast.
* [http://buzzword.org.uk/cognition/ Cognition] 0.1-&alpha;11 and above will parse hAudio 0.9 and export as RDF/XML or RDF/JSON. As of 0.1-&alpha;12, it will also export in M3U playlist format and Turtle.
* [http://weborganics.co.uk/mo-haudio/ hAudio Microformat to RDF Music Ontology], a [http://www.w3.org/TR/grddl/ GRDDL] profile for hAudio 0.9.1, producing [http://musicontology.com/ Music Ontology] RDF.
* The [http://singpolyma.net/plugins/actionstream/ wp-diso-actionstream] plugin produces hAudio for last.fm scrobbles
*...
<!--
See [[haudio-implementations|hAudio Implementations]].  
link not needed until section has become too large for this page (per previous specs)
-->


== References ==
== References ==
Line 378: Line 513:
* [http://gmpg.org/xmdp/ XMDP]
* [http://gmpg.org/xmdp/ XMDP]
* [[hcard|hCard]]
* [[hcard|hCard]]
* [[abbr-design-pattern]]
* [[currency-proposal]]
* [[datetime-design-pattern]]
* [[rel-design-pattern]]
* [[ISO-31-1|ISO-31-1/ISQ]]


=== Informative References ===
=== Informative References ===
Line 388: Line 528:


==== Similar Work ====
==== Similar Work ====
* [[media-info-examples]]
* [[media-info]]
* [[media-info-formats]]
* [[grouping-examples]]
* [[grouping-examples]]
* [[grouping-brainstorming]]
* [[grouping-brainstorming]]
Line 395: Line 534:


=== Copyright ===
=== Copyright ===
This document and specification is distributed under a [http://creativecommons.org/licenses/by/3.0/ Creative Commons Attribution 3.0 license]. It is licensed and can be used royalty-free for any purpose.


The authors intend to submit this specification to a standards body with a liberal copyright/licensing policy such as the GMPG (http://gmpg.org/), IETF (http://ietf.org/), and/or W3C (http://w3.org). Anyone wishing to contribute should read each organizations copyright principles, policies and licenses (e.g. the GMPG Principles (http://gmpg.org/principles)) and agree to them, including licensing of all contributions under all required licenses (e.g. CC-by 1.0 (http://creativecommons.org/licenses/by/1.0/) and later), before contributing.
This document and <span class="vevent"><span class="summary">hAudio specification was placed into the public domain</span> on <span class="dtstart">2008-11-14</span></span> by the authors. There are no usage, distribution, re-printing, or any other restrictions of any kind with regards to the text or content of this specification.


=== Patents ===
=== Patents ===


The authors of this Microformat have not and will not apply for patents covering any invention covering this Microformat in part or as a whole. There are no claims to any patent in this document. Each author is required to report any known patent issues immediately under this section.
{{MicroFormatPatentStatement}}


This document and specification is distributed under a royalty free patent policy, e.g. per the W3C Patent Policy (http://www.w3.org/Consortium/Patent-Policy-20040205/), and IETF RFC3667 (http://www.ietf.org/rfc/rfc3667.txt) & RFC3668 (http://www.ietf.org/rfc/rfc3668.txt).
=== Public Domain Release ===
 
The authors and editors of this page due hereby relinquish their copyright on the document and release the text of this page into the public domain.
 
* Manu Sporny - Signature /Manu Sporny/
* Alexandre Van de Sande
* [[User:WebOrganics|Martin McEvoy]]
* [[User:DavidLehn|David Lehn]] - Signature /David Lehn/
* [[User:AndyMabbett|Andy Mabbett]]


== Work in progress ==
== Work in progress ==
This specification is a work in progress. As additional aspects are discussed, understood, and written, they will be added.  
This specification is a work in progress. As additional aspects are discussed, understood, and written, they will be added.  
== Further Reading ==
=== Mailing List Discussion ===
* Renewed interest in audio-info Microformat
** http://microformats.org/discuss/mail/microformats-new/2007-March/000028.html
** http://microformats.org/discuss/mail/microformats-new/2007-April/000096.html
* Proposed solution to split media-info into audio, video and images
** http://microformats.org/discuss/mail/microformats-new/2007-April/000143.html
* Failed proposal to re-use hReview/hAtom
** http://microformats.org/discuss/mail/microformats-new/2007-April/000138.html
* Requirement to define collections for audio-info
** http://microformats.org/discuss/mail/microformats-new/2007-April/000183.html
* First attempt at hAudio proposal
** http://microformats.org/discuss/mail/microformats-new/2007-May/000252.html
==See also==
*[[audio-info-brainstorming]]
*[[audio-info-examples]]


== Related Pages ==
== Related Pages ==
{{haudio-related-pages}}
{{haudio-related-pages}}
* [[audio]] (other pages about Audio on this wiki)
[[Category:Draft Specifications]]

Latest revision as of 16:23, 18 July 2020

This document represents a draft microformat specification. Although drafts are somewhat mature in the development process, the stability of this document cannot be guaranteed, and implementers should be prepared to keep abreast of future developments and changes. Watch this wiki page, or follow discussions on the #microformats IRC channel to stay up-to-date.

604867362_da0921136a_o.png

hAudio is a simple, open, distributed format, suitable for embedding information about audio recordings in (X)HTML, Atom, RSS, and arbitrary XML. hAudio is one of several microformats open standards. This page and Microformat is in the public domain.

hAudio Microformat Draft Specification

Editors

Authors

Contributors

Manu Sporny, Martin McEvoy , Alexandre Van De Sande , Michael Johnson, Dave Longley, Brian Suda, Ben Wiley Sittler, Scott Reynen, Frances Berriman, James Craig, David Janes, Andy Mabbett, Danny Ayers, Rudy Desjardins, Theresa O'Connor, Ryan King, Chris Griego, Brad Hafichuk, Tantek Çelik, Colin Barrett, Joe Andrieu, Michael Smethurst, Chris Newell, Julian Stahnke, Justin Maxwell, Paul Wilkins and David I. Lehn.

Microformats #Copyright and #Patents statements apply.

Introduction

It is difficult for a browser to extract semantic information about an audio recording described on a web page. Metadata such as speaker, musician, publisher, label, title of the work, release date, acquisition link, related image artwork and tags provide relevant context for the audio recording.

Having such information marked up can provide a number of benefits to the viewer. If a web browser understands that a particular web page contains a song performed by an artist, it can produce richer interactions. For example, specific searches may be performed for artists and songs via general search services such as Google and Wikipedia. Specific search services may also be queried such as MusicBrainz, The Internet Archive, FreeDB, or Bitmunk. Additionally, classification by crawlers can become more accurate. If there are 20 tracks found on a page done by the same artist, and that content consumes a significant portion of the page, it can be assumed that the page is not only about music, but also about a particular artist.

In order to enable and encourage the sharing, distribution, syndication, and aggregation of audio content, the authors propose the hAudio microformat, an open standard for distributed audio metadata. The authors have researched both numerous audio-info-examples in the wild and earlier attempts at audio-info-formats, and have designed hAudio around a simple minimal schema for audio content. Feedback is encouraged on the hAudio feedback page.

Inspiration and Acknowledgments

Many thanks to the various individuals that did research and proposed ideas and discussion related to media info and audio info in general. Among the many participants are RodBegbie, Dean Hudson, Tantek Çelik, Mary Hodder, Joshua Kinberg, ChrisMessina, and Lisa Rein.

Scope

Audio content consistently share several common fields. Where possible hAudio has been based on this minimal common subset.

Out of scope

Fields that are type-specific have been omitted from hAudio. It is important that hAudio be kept simple and minimal from the start. Additional features can be added as deemed necessary by practical implementation experience.

The concept of a universal audio identifier, that is, how to identify the same audio album, song, speech, or podcast across different music and audio sites, though something very useful to have, is outside the scope of this format.

Format

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

In General

The hAudio format is based on a set of fields common to numerous audio content sites and formats in use today on the web. Where possible field names have been chosen based on those defined by the related hCard standards.

Schema

The hAudio schema consists of the following:

  • hAudio (haudio)
    • fn or/and album required. text.
    • contributor. optional. using text or hCard.
    • duration. optional. ISO-8601 time duration. (re-used from hcalendar).
    • item optional. using text or multiple properties from hAudio.
    • position optional. text.
    • category. optional. text.
    • published. optional.
    • photo. optional. using any element containing a URL, such as IMG.
    • description optional. text.
    • sample (rel). optional. sample file/stream using rel-design-pattern with sample as the mf-rel-value.
    • enclosure (rel). optional. full download of file using rel-enclosure.
    • payment (rel). optional. link to purchase process using rel-payment.
    • price optional. Using the sub properties currency and amount.

Field details

The fields of the hAudio schema represent the following:

hAudio

An hAudio is used to identify and describe metadata associated with an audio recording.

  • an hAudio element is identified by class name haudio

fn

The name of a single audio recording is a short textual description used to identify the work among interested parties. This can be the name of a speech, song name, or short description regarding a sound effect.

  • The element is identified by the class name fn.
  • hAudio MUST have fn or/and album.

Album

The title of a collection of audio recordings, such as those that are represented as a CD, album or LP. The text should be a short textual description used to identify the work among interested parties.

  • The element is identified by the class name album.
  • hAudio MUST have either album or fn or both.

Item

A container for another hAudio item, which MUST be considered a part of the parent audio recording. An example of an item that is part of an hAudio would be a track in an audio album, a aria in an Opera, or a section of a podcast.

  • The element is identified by the class name item.
  • hAudio MAY have one or more items.
  • The element MUST be processed opaquely. No sub-elements should be read from any hAudio contained in a track element.
  • The contents of the element MUST be marked up using properties in hAudio.

Position

The position is used to describe the position of the hAudio item in a list. Examples of hAudio lists can include album track listings, music top 10 lists, playlists, and podcast chapters.

  • The element is identified by the class name position.
  • hAudio MAY include one position element.
  • The contents of the element MUST be a number or other sequential identifier.
  • The sequential identifier MAY be specified out-of-sequence.

Contributor

A Contributor is any entity that takes part in the creation and distribution of an audio recording. Examples include: artist, composer, publisher, guitarist, vocalist, violinist, lead singer, backup singer, bassist, drummer, manager, and roadie.

  • The element is identified by the class name contributor.
  • hAudio MAY include one or more contributors.
  • The contributor's name SHOULD also be marked up as a valid hCard Microformat. hcard
    1. The role attribute SHOULD be used to specify the contributor's responsibility related to the audio recording if hCard is utilized.
  • The contributor's name MAY be specified in plain-text without being enclosed in a hCard Microformat.

Published

The published date specifies the date that the audio recording was made available to the public. Examples include: The airing date of a radio broadcast, the day a speech was given, or the day a music album was made available for sale.

  • The element is identified by the class name published.
  • hAudio MAY include one or more published elements.
  • The contents of the element MAY include a date format compliant with the datetime-design-pattern.

Sample

A Sample URI specifies from where an excerpt of the audio recording may be retrieved.

  • The element is identified by a URI fitting the rel-design-pattern, the rel content being sample.
  • hAudio MAY include one or more URI samples.
  • The URI SHOULD point to a directly accessible stream or file.
  • The type of the sample MAY be specified by using the type specifier for a URI.

Full Download (Enclosure)

A Full Download URI specifies from where the full version of an audio recording may be retrieved. The URI MUST point to a direct link to a file retrieval process (FTP, HTTP, BitTorrent URI, etc).

  • The element is identified by a URI fitting the rel-design-pattern, the rel content being enclosure.
  • hAudio MAY include one or more enclosure URIs.
  • The type of the file SHOULD be specified by using the type specifier for a URI.

Purchase (Payment)

A Purchase URI specifies from where the full version of an audio recording may be purchased. The URI MUST point to the beginning of a purchase process for the hAudio.

  • The element is identified by a URI fitting the rel-design-pattern, the rel content being payment.
  • hAudio MAY include one or more payment URIs.
  • The type of the file MAY be specified by using the type specifier for a URI.

Photo

A photo specifies an image that should be used to summarize the audio recording. Examples include: the image of a speaker, an audio album cover image, or a picture from a concert.

  • The element is identified by the class name photo.
  • hAudio MAY include one or more photo elements.
  • The element SHOULD use an <img> element.
  • The element MAY use any other element that contains a URL, such as <a> or <object>, but it is not recommended.

Category

The Category specifies the genre or style used to classify the audio recording. Examples include: blues, rock, motivational, spoken word, or sound effect.

  • The element is identified by the class name category.
  • hAudio MAY include one or more category elements.
  • This element MAY be expressed using the rel-tag elemental microformat. When a category is expressed using rel-tag, the content of the element is used as the text for the category. For example: <a class="category" rel="tag" href="/tags/symphony">Symphonic</a> would have "Symphonic" as the text for the category.

Duration

The Duration specifies the length in time of the audio recording. Examples include: 104 seconds, 3:23, and 4 minutes.

  • The element is identified by the class name duration.
  • hAudio MAY include one duration element.
  • The contents of the element MAY use the abbr-design-pattern whose title attribute contains an ISO-8601 formatted duration. An example of 3:23 (i.e 3 minutes 23 seconds) would be "PT3M23S" in ISO 8601 format.
  • The element MAY contain the following sub properties:
    • h Hour.
    • min Minute.
    • s Second.

Example:

<span class="duration">
<span class="h">1</span>:
 <span class="min">3</span>:
 <span class="s">23</span>
</span>

Price

The Price specifies the amount of currency that must be exchanged for acquisition of a full specimen of the audio recording.

  • The element is identified by the class name price.
  • hAudio MAY include one or more price elements.
  • The contents of the element MAY also use plain text with a currency symbol.
  • The contents MAY contain the following sub properties:
    • currency an ISO 4217 currency name.
    • amount a numerical value.

Example:

<span class="price">
	<abbr class="currency" title="GBP">£</abbr> 
	<span class="amount">4.99</span>
</span>

Description

An explanation of the contents of the hAudio item. This could explain the significance of a speech, the full-text description of a sound effect, or the meaning of a song or album.

  • The element is identified by the class name description.
  • hAudio MAY include one or more description elements. If more than one description element is defined, the full description for the hAudio is the concatenation, in order, of all description elements.

Parser Processing Notes

  • It is important to understand that ITEM is an opaque element. When processing the ITEM element, none of the properties of the child hAudio should be pulled into the parent hAudio. However, it is recommended that child hAudio SHOULD inherit the following parent hAudio properties, if they are not specified on the child:
    • album
    • contributor
    • category
    • published
    • photo

Semantic XHTML Design Principles

Note: the Semantic XHTML Design Principles were written primarily within the context of developing hCard and hCalendar, thus it may be easier to understand these principles in the context of the hCard design methodology (i.e. read that first). Tantek

XHTML is built on XML, and thus XHTML based formats can be used not only for convenient display presentation, but also for general purpose data exchange. In many ways, XHTML based formats exemplify the best of both HTML and XML worlds. However, when building XHTML based formats, it helps to have a guiding set of principles.

  1. Reuse the schema (names, objects, properties, values, types, hierarchies, constraints) as much as possible from pre-existing, established, well-supported standards by reference. Avoid restating constraints expressed in the source standard. Informative mentions are ok.
    1. For types with multiple components, use nested elements with class names equivalent to the names of the components.
    2. Plural components are made singular, and thus multiple nested elements are used to represent multiple text values that are comma-delimited.
  2. Use the most accurately precise semantic XHTML building block for each object etc.
  3. Otherwise use a generic structural element (e.g. <span> or <div>), or the appropriate contextual element (e.g. an <li> inside a <ul> or <ol>).
  4. Use class names based on names from the original schema, unless the semantic XHTML building block precisely represents that part of the original schema. If names in the source schema are case-insensitive, then use an all lowercase equivalent. Components names implicit in prose (rather than explicit in the defined schema) should also use lowercase equivalents for ease of use. Spaces in component names become dash '-' characters.
  5. Finally, if the format of the data according to the original schema is too long and/or not human-friendly, use <abbr> instead of a generic structural element, and place the literal data into the 'title' attribute (where abbr expansions go), and the more brief and human readable equivalent into the element itself. Further informative explanation of this use of <abbr>: Human vs. ISO8601 dates problem solved

More Semantic Equivalents

For some properties there is a more semantic equivalent, and therefore they get special treatment, e.g.:

  • For "photo", use <img class="photo" src="..." alt="" />
  • If only 'album' is specified, then the hAudio is an album.
  • If only 'fn' is specified, then the hAudio is a song, audio track, sound effect, speech, or other atomic/singular work.
  • If both 'album' and 'fn' are specified, then the hAudio is a atomic/singular work that is part of an album.
    • Example: <span class="haudio">Side two of <span class="album">Meddle</span> opens with <span class="fn">One of These Days</span></span>
  • If 'fn' and one or more 'items's are specified, the hAudio is an audio recording containing multiple sections. Each item is assumed to be an hAudio that is part of the parent hAudio. None of the 'item' properties should implicitly be added to the containing hAudio. In other words, the parser shouldn't parse the contents of the 'item' into the higher-level hAudio object.

Language

  • To explicitly convey the natural language that an hAudio is written in, use the standard (X)HTML 'lang' or 'xml:lang' attribute on the element with class="haudio"
    • e.g. <p>I like <span class="haudio" lang="de"><span class="fn">Das Lied von der Erde</span></span> best.</p>
  • If portions of an hAudio (e.g. the item name) are in a different language to the rest of the hAudio, use the 'lang' or 'xml:lang' attribute on those portions.
  • hAudio parsers which need to handle the native language of hAudio MUST process the standard (X)HTML 'lang' or 'xml:lang' attribute as specified.
  • hAudio parsers which need to handle native language MAY traverse up the DOM to discover the native language of the page and apply that to the hAudio if no other language is specified on the hAudio.

Human vs. Machine Readable

If an <abbr> element is used for a property, then its 'title' attribute is used for the value of the property, instead of the contents of the element, which can then be used to provide a user-friendly alternate presentation of the value.

If an <a> element is used for one or more properties, it MUST be treated as follows:

  1. For the 'photo' property and any other property that takes a URL as its value, the href="..." attribute provides the property value.
  2. For other properties, the element's content is the value of the property.

If an <img> element is used for one or more properties, it MUST be treated as follows:

  1. For the 'photo' property and any other property that takes a URL as its value, the src="..." attribute provides the property value.
  2. For other properties, the <img> element's 'alt' attribute is the value of the property.

If an <object> element is used for one or more properties, it MUST be treated as follows:

  1. For the 'photo' property and any other property that takes a URL as its value, the data="..." attribute provides the property value.
  2. For other properties, the element's content is the value of the property.

Notes

This section is informative.

  • By marking up audio content with the hAudio microformat, the expectation is communicated that information about the content MAY be indexed. This has no impact on the copyright of the content itself which the publisher may explicitly specify using the rel-license microformat.

XMDP Profile

See: haudio-profile.

Examples

This section is informative.

Here are a few examples of text about, and links to, audio content, from real web sites, showing how they could be easily enhanced to use hAudio.


Simple Song Example

Display:

(This is a live example, detectable in parsers)

Start Wearing Purple by Gogol Bordello

Microformatted XHTML:

<div class="haudio">
   <span class="fn">Start Wearing Purple</span> by 
   <span class="contributor">Gogol Bordello</span>
</div>

Speech Example

(This is a live example, detectable in parsers)

Display:

I Have a Dream, a speech by Martin Luther King, Jr.

Microformatted XHTML:

	 
<div class="haudio">	 
   <span class="fn">I Have a Dream</span>, a 	 
   <span class="category">speech</span> by 	 
   <span class="contributor">
      <span class="vcard">
         <span class="fn n">
            <span class="given-name">Martin</span>
            <span class="additional-name">Luther</span>
            <span class="family-name">King</span>,
            <span class="honorific-suffix">Jr.</span>
         </span>
      </span>
   </span>
</div>	 

Note the use of hCard.

Song and Album Example

(This is a live example, detectable in parsers)

Display:

Start Wearing Purple by Gogol Bordello found on Underdog World Strike

Microformatted XHTML:

<div class="haudio">
   <span class="fn">Start Wearing Purple</span> by 
   <span class="contributor">
        <span class="vcard">
            <span class="fn org">Gogol Bordello</span>
        </span>
    </span>
   found on
   <span class="album">Underdog World Strike</span>
</div>

Note that for bands, hCard's Implied "organization-name" Optimization is used.

Complete Album Example

An example that uses every element of hAudio:

[Image] Live Phish, Volume 15 by Phish
Released: October 31, 2002
Acquire: Sample, Live Recording, Buy High Quality Track
Category: live
Duration: 145 minutes, 27 seconds
Price: $14.99

Tracks:
1. Sanity (5:48)
2. Highway To Hell (3:39)

Here is the hAudio Microformat markup:

<div class="haudio">
   <img class="photo" src="images/live_phish_vol_15.jpg" alt="" />
   <span class="album">Live Phish, Volume 15</span>
   <span class="contributor">
      <span class="vcard">
         <span class="fn org">Phish</span>
      </span>
   </span>
   <br/>
   Released on:
   <abbr class="published" title="2002-10-31">October 31, 2002</abbr>
   <br/>
   Acquire: 
   <a rel="sample" href="/samples/live_phish_vol_15_sample.mp3">Sample</a>, 
   <a rel="enclosure" href="/live/phish_live_phish_vol_15.mp3">Live Recording</a>,
   <a rel="payment" href="/buy/phish_live_phish_vol_15">Buy High Quality Track</a>
   Category: <a class="category" rel="tag" href="http://www.example.org/tags/live">live</a>
   Duration: <abbr class="duration" title="PT145M27S">145 minutes, 27 seconds</abbr>
   Price: <div class="price"><abbr class="currency" title="USD">$</abbr><span class="amount">14.99</span></div>
   Tracks:
   <div class="item">
      <span class="position">1</span>.
      <span class="fn">Sanity</span>
      (<abbr class="duration" title="PT5M48S">5:48</abbr>)
    </div>
    <div class="item">
     <span class="position">2</span>.
     <span class="fn">Highway To Hell</span> 
     (<abbr class="duration" title="PT3M39S">3:39</abbr>)
  </div>
</div>

Multi-part Podcast Example

DigitalPlanet Podcast: 29 Oct 07

Forensic computing: is it really possible to delete data from your machine? Grand plans for getting broadband into Africa, checking out the sky at night via the internet and answering your emails to the programme.

Download MP3

<div class="haudio">
<p>
   <span class="fn">DigitalPlanet Podcast</span>
   :
   <abbr class="published" title="20071029">29 Oct 07</abbr>
</p>
<p>
   <div class="item">
      <span class="fn">Forensic computing: is it really possible to delete data from your machine?</span>
   </div>
   <div class="item">
      <span class="fn">Grand plans for getting broadband into Africa</span>
   </div>
   , 
   <div class="item">
      <span class="fn">checking out the sky at night via the internet</span>
   </div> 
   and 
   <div class="item">
      <span class="fn">answering your emails</span>
   </div>
   to the programme.
</p>
<p>
   <a rel="enclosure" href="/download/episode/DigitalPlanet-2007-10-29">Download MP3</a>
</p>
</div>

Opera Example

(This is a live example, detectable in parsers)

La Bohème is an opera in four acts by Giacomo Puccini to an Italian liberetto by Luigi Illica and Giuseppe Giacosais. I saw it performed last week and found Act III to be pretty interesting, especially the "Sa dirmi, scusi" and "O buon Marcello, aiuto!" arias.


<div class="haudio" lang="en">
   <span class="fn" lang="fr">La Bohème</span> 
   is an 
   <span class="category">opera</span> 
   in four acts by 
   <span class="contributor" lang="it">Giacomo Puccini</span>
   to an 
   <span class="category">Italian liberetto</span>
   by
   <span class="contributor" lang="it">Luigi Illica</span>
   and
   <span class="contributor" lang="it">Giuseppe Giacosais</span>.
   I saw it performed last week and found
   <span class="item">
      <span class="fn">Act III</span>
       to be pretty interesting, especially the
      <span class="item">
         "<span class="fn" lang="it">Sa dirmi, scusi</span>"
      </span>
      and
      <span class="item">
         "<span class="fn" lang="it">O buon Marcello, aiuto!</span>"
      </span>
      arias.
   </span>
</div>

Examples in the wild

This section is informative.

Implementations

This section is informative.

References

Normative References

Informative References

Similar Work

Copyright

This document and hAudio specification was placed into the public domain on 2008-11-14 by the authors. There are no usage, distribution, re-printing, or any other restrictions of any kind with regards to the text or content of this specification.

Patents

This specification is subject to a royalty free patent policy, e.g. per the W3C Patent Policy, and IETF RFC3667 & RFC3668.

Public Domain Release

The authors and editors of this page due hereby relinquish their copyright on the document and release the text of this page into the public domain.

Work in progress

This specification is a work in progress. As additional aspects are discussed, understood, and written, they will be added.

Related Pages