Advice on the rating attribute

1 view
Skip to first unread message

Jason Kahn

unread,
Jul 28, 2010, 5:49:23 PM7/28/10
to activity...@googlegroups.com, Joseph Holsten

I’m having a bit of trouble understanding the spec when it comes to how to represent a rating on a reviewed item:

A rating attribute of the reviewed object. The rating is an optional field and is modeled after the rating attribute from the hReview microformat.”

 

Which of the following code samples would be considered correct?

<activity:object>

       <activity:object-type>http://activitystrea.ms/schema/1.0/review</activity:object-type>

       <title>My cool review.</title>

       <summary>5/7 stars.  I think this is cool</summary>

       <activity:rating>5</activity:rating>

</activity:object>  

 

<activity:object activity:rating="5">

       <activity:object-type>http://activitystrea.ms/schema/1.0/review</activity:object-type>

       <title>My cool review.</title>

       <summary>5/7 stars.  I think this is cool</summary>

</activity:object>  

 

<activity:object>

       <activity:object-type>http://activitystrea.ms/schema/1.0/review</activity:object-type>

       <title>My cool review.</title>

       <summary><span class="rating">5</span>/<span class="best">7</span> stars.  I think this is cool</summary>

</activity:object>

 

The third seems closest to the hReview microformat, but not necessarily in line with how data is usually presented in feeds/activity streams.  Any guidance would be greatly appreciated!

 

Thanks!

Jason

 

[copying Joseph as he posted a similar question back in April]

 

Reply all
Reply to author
Forward
0 new messages