h-review-aggregate: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(→‎Validating: {{h-spec-section-validating}})
m (s/<source>/<syntaxhighlight>/)
 
(9 intermediate revisions by 3 users not shown)
Line 4: Line 4:


----
----
<entry-title>h-review-aggregate</entry-title>
{{DISPLAYTITLE:h-review-aggregate}}
<dfn style="font-style:normal;font-weight:bold">h-review-aggregate</dfn> is a simple, open format for embedding review information (of products, services, businesses, etc). Whereas [[h-review]] is intended for an individual review, h-review-aggregate is meant for summary information about a collection of user or critic reviews about an item.
<dfn style="font-style:normal;font-weight:bold">h-review-aggregate</dfn> is a simple, open format for embedding review information (of products, services, businesses, etc). Whereas [[h-review]] is intended for an individual review, h-review-aggregate is meant for summary information about a collection of user or critic reviews about an item.


Line 12: Line 12:
:This is a '''Draft Specification'''.
:This is a '''Draft Specification'''.
;Participate
;Participate
:[[IRC]]: [irc://irc.freenode.net/microformats #microformats on Freenode]
:[[IRC]]: [irc://irc.libera.chat/microformats #microformats on Libera]
<div class="p-author h-card vcard">
<div class="p-author h-card vcard">
;<span class="p-role role">Editor</span>
;<span class="p-role role">Editor</span>
Line 23: Line 23:
== Example ==
== Example ==
Here is a simple example showing aggregate review information for a restaurant:
Here is a simple example showing aggregate review information for a restaurant:
<syntaxhighlight lang="html">
<article class="h-review-aggregate">
<h1 class="p-item">Mediterranean Wraps</h1>
<p class="p-name">Customers flock to this small restaurant for their
tasty falafel and shawerma wraps and welcoming staff.</p>
<span class="p-average">4.5</span> out of 5
based on <span class="p-count">17</span> reviews
</article>
</syntaxhighlight>


== Properties ==
== Properties ==
=== Proposed Properties ===
Proposed properties from [[hReview-aggregate]] awaiting citations of publishing and consuming examples.
* '''<code>p-item</code>''' - Required: the thing been reviewed, including embedded microformat for e.g. business or person ([[h-card]]), event ([[h-event]]), place ([[h-adr]] or [[h-geo]]), product ([[h-product]]), website, url, or other item ([[h-item]]).
* '''<code>p-average</code>''' - Required: the fixed point integer [1.0-5.0] of the average rating (5.0 best)
* '''<code>p-best</code>'''  - Optionally define best rating value. can be numerically lower than worst.
* '''<code>p-worst</code>'''  - Optionally define worst rating value. can be numerically higher than best.
* '''<code>p-count</code>'''  - the total number of reviews
* '''<code>p-votes</code>'''  - the total number of users who have rated the product or service, contributing to the average rating. For some sites, the number of votes is equal to the number of reviews, so <code>count</code> may be used and this property omitted.
* '''<code>p-name</code>''' - This optional property can be the title for the review collection or a very short summary of the consensus opinion from the collection.


== Property Details ==
== Property Details ==


== Examples in the wild ==
== Examples in the wild ==
Add any h-review-aggregate examples you find in the wild:
* [https://breakfastand.coffee Breakfast and Coffee] publishes h-review-aggregate on pages that aggregate all of the reviews for a coffee shop or eatery. The h-review-aggregate is updated automatically when a new, valid h-review [https://indieweb.org/Webmention Webmention] is sent to the page.
** Example: https://breakfastand.coffee/Fortitude_Coffee_-_Newington_Road_-_Edinburgh


== Validating ==
== Validating ==
Line 36: Line 60:


== Backward Compatibility ==
== Backward Compatibility ==
=== Parser Compatibility ===
This is a '''draft''' based on reviewing [[hreview-aggregate-examples-in-wild#Reviewed_Examples|hReview-aggregate examples]], pending parser implementations and feedback.


== Change control ==
Microformats parsers {{should}} detect classic properties only if a classic root class name is found and parse them as microformats2 properties.  
Minor editorial changes (e.g. fixing minor typos or punctuation) that do not change and preferably clarify the structure and existing intended meaning may be done by anyone without filing issues, requiring only a sufficient "Summary" description field entry for the edit. More than minor but still purely editorial changes may be made by an editor. Anyone may question such editorial changes by undoing corresponding edits without filing an issue. Any further reversion or iteration on such an editorial change must be done by filing an issue.
 
For the stable features of this document, substantive issue filing, resolution, and edits may be done by filing an [[h-entry-issues|issue]] and discussing them on the issue and on #microformats [[IRC]] with a link to the issue.
 
Because this is primarily a vocabulary specification, very few issues beyond the list of vocabulary have filed or required any lengthy discussion. If such a non-trivial issue arises in the future, use the [[microformats2-parsing#change_control|microformats2-parsing change control process]] to resolve them.
 
In general, non-vocabulary related features or requirements should be avoided in this specification, e.g. changes to microformats2 syntax must be proposed as [[microformats2-parsing]] changes using the [[microformats2-parsing#change_control|microformats2-parsing change control process]].


Beyond that, the following requirements must be met for adding or moving features (e.g. properties and values) to proposed, draft, or stable:
If an <code>h-review-aggregate</code> is found, don't look for an <code>hreview-aggregate</code> on the same element.


;Proposed
Compat root class name: <code id="hreview-aggregate">hreview-aggregate</code><br>
:[[#Proposed_Additions|Proposed features]] must provide documentation of what specific real world use-cases they are solving, preferably with a link to a step-by-step user scenario, e.g. demonstratable using existing non-standard / single-site / single-implementation tools.
Properties: (parsed as '''p-''' plain text unless otherwise specified):
;Draft
:[[#Draft_Properties|Draft properties]] must in addition be published and consumed in the wild on the public web, demonstrate solving the use case for which they were proposed, and should provide citations of real world public web sites publishing and (other sites) consuming them, interoperably.
;Stable
:Stable features (e.g. [[#Core_Properties|Core Properties]]) must in addition be published and consumed in the wild on multiple sites by multiple implementations (3+ different sites and implementations for publishing and  consuming). When a draft property reaches a critical mass of deployment by numerous sites and implementations (far beyond 3+), due to network effects and backward compatibility considerations it effectively becomes stable, since it becomes increasingly difficult to change it in any way and have so many sites and implementations also change.


For creating an entirely new vocabulary, and more details about how to research existing values, properties, document examples in the wild, etc., see the microformats [[process]].
* <code>item</code> - parse as '''<code>p-item</code>'''
* <code>average</code> - parse as '''<code>p-average</code>'''
* <code>best</code> - parse as '''<code>p-best</code>'''
* <code>worst</code> - parse as '''<code>p-worst</code>'''
* <code>count</code> - parse as '''<code>p-count</code>'''
* <code>votes</code> - parse as '''<code>p-votes</code>'''
* <code>summary</code> - parse as '''<code>p-name</code>'''


==== Notes ====
Based on [[hreview-aggregate-examples-in-wild#Reviewed_Examples|hReview-aggregate examples]], this is how many times each property appeared.


----
<pre>item: 10
rating: 10
average: 8
best: 8
count: 5
votes: 5
worst: 0
summary: 0</pre>


== Todo ==
== Todo ==

Latest revision as of 21:24, 26 July 2023

This article is a stub. You can help the microformats.org wiki by expanding it.

This page is a placeholder for the h-review-aggregate specification, an upgrade of hReview-aggregate to microformats2. Please refer to the #Todo section.


h-review-aggregate is a simple, open format for embedding review information (of products, services, businesses, etc). Whereas h-review is intended for an individual review, h-review-aggregate is meant for summary information about a collection of user or critic reviews about an item.

h-review-aggregate is one of several open microformat draft standards suitable for embedding data in HTML and is the microformats2 update to hReview-aggregate.

Status
This is a Draft Specification.
Participate
IRC: #microformats on Libera
License
Per CC0, to the extent possible under law, the editors have waived all copyright and related or neighboring rights to this work. In addition, as of 2024-12-04, the editors have made this specification available under the Open Web Foundation Agreement Version 1.0.

Example

Here is a simple example showing aggregate review information for a restaurant:

<article class="h-review-aggregate">
 <h1 class="p-item">Mediterranean Wraps</h1>
 <p class="p-name">Customers flock to this small restaurant for their 
 tasty falafel and shawerma wraps and welcoming staff.</p>
 <span class="p-average">4.5</span> out of 5 
 based on <span class="p-count">17</span> reviews
</article>

Properties

Proposed Properties

Proposed properties from hReview-aggregate awaiting citations of publishing and consuming examples.

  • p-item - Required: the thing been reviewed, including embedded microformat for e.g. business or person (h-card), event (h-event), place (h-adr or h-geo), product (h-product), website, url, or other item (h-item).
  • p-average - Required: the fixed point integer [1.0-5.0] of the average rating (5.0 best)
  • p-best - Optionally define best rating value. can be numerically lower than worst.
  • p-worst - Optionally define worst rating value. can be numerically higher than best.
  • p-count - the total number of reviews
  • p-votes - the total number of users who have rated the product or service, contributing to the average rating. For some sites, the number of votes is equal to the number of reviews, so count may be used and this property omitted.
  • p-name - This optional property can be the title for the review collection or a very short summary of the consensus opinion from the collection.

Property Details

Examples in the wild

Add any h-review-aggregate examples you find in the wild:

Validating

Main article: validators

Test and validate microformats2 markup in general with:

Implementations

Backward Compatibility

Parser Compatibility

This is a draft based on reviewing hReview-aggregate examples, pending parser implementations and feedback.

Microformats parsers SHOULD detect classic properties only if a classic root class name is found and parse them as microformats2 properties.

If an h-review-aggregate is found, don't look for an hreview-aggregate on the same element.

Compat root class name: hreview-aggregate
Properties: (parsed as p- plain text unless otherwise specified):

  • item - parse as p-item
  • average - parse as p-average
  • best - parse as p-best
  • worst - parse as p-worst
  • count - parse as p-count
  • votes - parse as p-votes
  • summary - parse as p-name

Notes

Based on hReview-aggregate examples, this is how many times each property appeared.

item: 10
rating: 10
average: 8
best: 8
count: 5
votes: 5
worst: 0
summary: 0

Todo

Tasks for this page.

In summary:

  • copy h-review
  • use root class name "h-review-aggregate" instead of "h-review"
  • add "p-count", "p-votes" properties as defined in hReview-aggregate
  • prune set of properties to those listed in hReview-aggregate
  • change backcompat parsing for root class name to "hreview-aggregate"
  • change backcompat parsing property class names to those listed in hReview-aggregate

See Also