hReview and hContainer

Looking over my previous post on hReview, I have to confess that it doesn't look as supportive as I had intended. So here - with my apologies - is a mark two...

hReview defines a microformat that can be used in both traditional web pages and blog posts. It can do this because it is essentially self-contained and makes no assumptions about how the content is published. This post considers the question of whether microformats, in general, should take advantage of different publishing techniques and, if so, how.

I start with the observation that a number of the elements of hReview would appear to mimic elements familiar to typical a blog publishing environment. For example comparing hReview with Atom (0.8):

hReviewAtom
summarytitle
reviewerauthor
contributor
dtreviewedpublished
updated
permalinkid

where required fields are shown as field-name.

The question arises about what should happen if an hReview is published as [part of] a blog post? For example what happens if the summary and permalink fields are not present; could or should some review indexer use the blog equivalents? Obviously the answer is no if a blog post contains multiple hReviews. But, for the moment, lets consider what I would consider to be the more common situation when there is a single hReview in a blog post.

I would suggest modifying the rules of how a review indexer should obtain metadata about a review; some metadata comes from markup in the review itself and some comes from its context. In the context of the blog post, the extent of the review is merely the extent of the post. Thus there is no need for an enclosing element with class="hreview". It would be sufficient to mark the entire blog post with a suitable tag, for example:

<a href="http://www.technorati/com/tag/hreview_instance"
  rel="tag">hreview_instance</a>

For an hReview published as a blog post the only required elements would be the hreview_instance tag and the item info field. For an hReview published as a standard web page, the requirements could be the same provided there is a way of establishing the context, most obviously defining the extent of review. Rather than use an hReview specific class="hreview" element, the review extent could be defined by a generic container that can carry the same information as a blog post context. I would propose an hContainer which could be reused in this role across multiple microformats that must define an extent.

Thus the review:

<div>
 <span>5 stars out of 5 stars</span>
 <h4>Crepes on Cole is awesome</h4>
 <span>Reviewer: <span>Tantek</span> - 
 April 18, 2005</span>
 <blockquote><p>
  Crepes on Cole is one of the best little 
  creperies in San Francisco. Excellent food 
  and service....
 </p></blockquote>
 <p>Visit date: <span>April 2005</span></p>
 <p>Food eaten: <span>Florentine crepe</span></p>
</div> 

becomes:

<div class="hcontainer">
 <span>
  <span class="rating>5 stars out of 5 stars</span>
 </span>
 <h4 class="title">
  <span class="item fn">Crepes on Cole is awesome</span>
 </h4>
 <span>Reviewer: 
  <span class="author fn">Tantek</span> - 
  <abbr class="updated" title="20050418T2300-0700">
   April 18, 2005
  </abbr>
 </span>
 <blockquote class="description"><p>
  Crepes on Cole is one of the best little 
  creperies in San Francisco. Excellent food 
  and service....
 </p></blockquote>
 <p>Visit date: <span>April 2005</span></p>
 <p>Food eaten: <span>Florentine crepe</span></p>
 <span style="visibility:hidden;">
  <a href="http://www.technorati/com/tag/hreview_instance" 
   rel="tag">hreview_instance</a>
 </span>
</div> 

This is essentially the same as the current hReview proposal, except that some of the field names have been changed to make them more generic and the hreview_instance tag has been added.

Tags: hreview

Comments

Popular posts from this blog

A Review of hReview

SmartLink

Google I/O 2013