From Microformats Wiki
Revision as of 17:04, 27 November 2006 by AaronGustafson (talk | contribs) ()
Jump to navigation Jump to search

Brainstorming for hProduct Microformat

This is a brainstorm for the hProduct microformat. Examples of hProduct can be found here.


The Problem

There are numerous ways to publish product information on the web, but nothing is stanardized. It would be useful to have standardized product information on the web for creating mash-up applications which could

  • allow aggregated product details to be linked to from hListings or hReviews
  • match hListings to hReviews
  • aggregate product-specific information from across the web
  • aggregate and compare like products based on features

Elements that come up often in practice

Examples of elements that might be included because they seem to come up often in user- and CMS-generated product publishing, include the following:

Base Elements

  • name (or fn)
  • image (could be sub-categorized)
    • thumb (for thumbnail)
    • full (for full size image)
    • photo (for a photograph)
    • illo (for an illustration).
  • description (could be sub-categorized)
    • summary
    • extended
  • brand
  • uri (or url) - URI for the product at its brand website; not to be confused with the hListing 'permalink'.
  • msrp


Being that so many products in the world have specific charachteristics or properties, we thought it might be wise to create a means of standardizing the listing of that information, setting the stage for possible subformats of hProduct. This could be done by setting up property value paris or groups using a CLASS of "p-v". It would be possible to offer a few means of doing this.

Natural language property-value association

<p class="p-v">The <span class="property">dimensions</span> of this book are 
  <span class="value">6½"(<abbr title="width">W</abbr>) × 
  12"(<abbr title="height">H</abbr>) ×
  1¾"(<abbr title="depth">D</abbr>)</span></p>

List property-value association (pairs)

  <li class="p-v">
    <span class="property">Mileage</span>: 
    <em class="value">34,787</em>
  <li class="p-v">
    <span class="property">Year</span>: 
    <em class="value">2006</em>
  <li class="p-v">
    <span class="property">Exterior Color</span>: 
    <em class="value">Burgundy</em>
  <li class="p-v">
    <span class="property">Body Style</span>: 
    <em class="value">Hatchback</em>

List property-value association (groups)

Note: as a DL contains semantic property-value pairs/groups, setting a CLASS of "p-v" should be enough (reducing extra markup).

<dl class="p-v">
  <dd>Burgundy (Exterior)</dd>
  <dd>Tan (Interior)</dd>

Non-visible property names

We have considered the possibility of allowing property names to be invisible to users by allowing the addition of the property name as a class immediately following the "propery" CLASS keyword:

<ul class="p-v">
  <li class="property mileage">34,787</li>
  <li class="property year">2006</li>
  <li class="property color-exterior">Burgundy</li>
  <li class="property body-style>Hatchback</li>

Parsing would be a bit trickier, but from the perspective of someone marking up the document, it is pretty simple and straightforward.

Suggested Additions

  • image sub-categorization (could make use of Media microformat?):
    • thumb (for thumbnail)
    • full (for full size image)
    • photo (for a photograph)
    • illo (for an illustration).
  • description sub-categorization:
    • summary
    • extended
  • uri (or url) - URI for the product at its brand website; not to be confused with the hListing 'permalink'.

Isn't this duplicating hListing and hReview?

No, hProduct would not seek to compete with hListing or hReview, it simply aims to enhance them. In either of these microformats, the item could easily contain the hProduct. Also, hProduct is the more appropriate place for Manufacturer's Suggested Retail Price (MSRP), which is not likely to be the final price of the product being listed. The actual price/sale price/final price should be solely in the domain of hListing.