aggregate-microformat-template-brainstorming

From Microformats Wiki
Jump to navigation Jump to search

Aggregate microformats: brainstorming

Ideas/proposal for how to mark up aggregate or summary information about a collection of related microformats (i.e. aggregation of user reviews, summary of product offers, summary of posts on a message board, etc).

Since summary information can be relevant for many different types of microformats, it seems useful to design a system of marking up aggregate/summary information that generalizes to any existing or future microformat.


Why do we need to mark this information up at all?

Why can't the parser reconstruct the aggregate information by reading each individual microformat?

Although doing so is possible in some cases, in real-life scenarios it is often infeasible (or at a minimum much less efficient) to reconstruct aggregate info rather than reading the summary data written on the page directly, since the content being aggregated can be voluminous and spread across many web pages.


Types of information that appear in the examples

  • The number of microformats being summarized is important in every example aggregation (i.e. 23 reviews, 50 products, 14 events, 6 recipes)
  • For ratings, the average rating score is important
  • In the Yelp example, sample descriptions are also included
  • For prices, the range (low and high price) are relevant
  • For message board posts, the most recent post date is relevant


Proposal

Here is a proposed template for defining aggregate microformats:

  • For any microformat "hX" there is a corresponding aggregate microformat that follows a consistent naming convention. For example, an aggregate hReview could be "hReview-aggregate" and an aggregate hAtom could be "hAtom-aggregate."
  • The aggregate microformat "hX-aggregate" contains all of the same attributes as the original microformat "hX".
  • Each attribute borrowed from "hX" can also take on some sub-attributes -- min, max, average, or sample. So an average rating would be class="rating average", a lowest price would be class="price min", a most recent blog post date would be class="updated max" (where max here is interpreted as the latest date), and a sample summary from a review would be class="summary sample".
  • Aggregate microformats contain an additional attribute that isn't imported from "hX" -- for purposes of discussion, let's call this "count." It contains the number of objects that are being summarized.
  • Aggregate microformats can optionally contain one or more sample instances of the microformats that are being aggregated. So an hReview-aggregate could contain sample hReviews. The reason for this is that sites often highlight specific instances of "hX" on their summary pages. Amazon shows the most popular reviews on the first page for a product. Shopping aggregator sites usually show the best deals first in a list of offers.

Example: hypothetical aggregate review on Yelp

URL: http://www.yelp.com/biz/vive-sol-restaurant-mountain-view

<div class="hReview-aggregate">
 <span class="fn">Vive Sol Restaurant</span>
 <div class="rating"><span class="average">4</span></div> star rating 
 based on <span class="count">180</span> reviews.
</div>

See also