[uf-discuss] hReview Question/Statement

Tantek Ç elik tantek at cs.stanford.edu
Wed Dec 7 08:34:36 PST 2005


On 12/6/05 7:36 AM, "David Janes -- BlogMatrix" <davidjanes at blogmatrix.com>
wrote:

> What's the rule for associating "rating" with "best"? I'm looking at
> this example [1] from the Wiki:
> 
> <ul class="categories">
>  <li><a href="http://en.wikipedia.org/wiki/Food" rel="tag">
>   Food: <span class="rating">18</span>/<span
> class="best">30</span></a>;</li>
>  <li><a href="http://flickr.com/photos/tags/Ambience" rel="tag">
>   Ambience: <span class="rating">19</span>/<span
> class="best">30</span></a>;</li>
>  <li><a href="http://en.wikipedia.org/wiki/Service" rel="tag">
>   Service: <span class="rating">15</span>/<span
> class="best">30</span></a>;</li>
>  <li><a href="http://en.wikipedia.org/wiki/Price" rel="tag">
>   Price: <abbr class="rating" title="2">$$</abbr>...</a></li>
> </ul>
> 
> and the implied rule (if it follows) seems rather loosey goosey: if it's
> under the same parent element, associate them?.

Not quite.  The example above is demonstrating rated *tags*, i.e. a rating
along a specific axis, which is identified by with a tag.

Thus the rel-tag link forms the container in which there is a "rating" and a
"best" (and optionally a "worst") value.  Thus "rating", "best", and "worst"
are associated by containment within a single tag.

That being said...

> For example, there's
> clear way to write:
> 
> <p>
> On Fred's <span class="best">4</a> ICBM scale, I give this a <span
> class="rating">2</a>.
> </p>

I need to put in an example of exactly this.

I think to convey the scale of an overall rating, we may need to borrow the
"value" construct from hCard (as it is used in "tel" properties for
example).

 http://microformats.org/wiki/hcard#Value_excerpting

Thus the above could (should?) be marked up as:

<p class="rating">
On Fred's <span class="best">4</a> ICBM scale, I give this a <span
class="value">2</a>.
</p>

I will add this to hreview-feedback as something to make explicit in hReview
0.3.

> Would it not be better to explicitly place them within a named parent
> container (say "rated")? Then one no longer needs to make sure
> everything is grouped in some explicit way:
> 
> <p class="rated">
> I rate all my Chilis on a <span class="best">4</span> ICBM scale. The
> best I ever had was Texas Joe's Twister, which render large parts of the
> midwest uninhabitable later that night and earned a <span
> class="rating">4</span> from me.
> </p>

>From a schema standpoint, yes, agreed completely.  As to the names of the
specific fields, as noted above, we can reuse the property/"value" construct
from hCard, and avoid having to have both "rated" and "rating".

Thanks very much for the feedback David.  This will be a definite
improvement in hReview 0.3.

Tantek



More information about the microformats-discuss mailing list