container-brainstorming: Difference between revisions
m (→=Shared hCalendar Properties: Added contextual intro sentence to examples. Fixed code+heading) |
(add an examples section with links to specific examples on sustainlane.com and yelp.com, separate markup proposals section) |
||
Line 10: | Line 10: | ||
==Why is this being explored?== | ==Why is this being explored?== | ||
There are a number of use cases for making better use of these container semantics, both in microformats like hCalendar that already have containers, and [[hReview]], where no current container concept exists. | |||
== examples == | |||
As always it helps to start with examples of markup from actual websites that are already publishing container semantics. If this section gets too large, perhaps we can move it to [[container-examples]]. | |||
=== container of reviews === | |||
The following website(s) contain a list of reviews which could/would benefit from a way of marking up not just the reviews as hReviews, but also the set of them as reviewing the same item. | |||
==== SustainLane ==== | |||
http://www.sustainlane.com/ has pages that show multiple reviews of the same item. e.g. | |||
http://www.sustainlane.com/reviews/aziza/TVLWN4ZKQLKTOIKFLWKBWFQ17DN8 | |||
==== Yelp ==== | |||
http://yelp.com/ has pages that show multiple reviews of the same item. e.g. | |||
http://www.yelp.com/biz/coffee-to-the-people-san-francisco | |||
==Use cases== | ==Use cases== | ||
Here are some example use cases for sharing properties from a container into multiple child microformats: | |||
===Multiple reviews of the same item=== | |||
As demonstrated by the above real world examples, many sites publish a page for a single item, listing multiple reviews of that item (e.g. Amazon, Kelkoo, Yelp, Yahoo! Location etc.). The item appears once at the top of the page. The reviews follow. [[hReview]]'s current requirement is that the <code>item</code> be referenced from every review using the include-pattern. This requires duplicating some amount of content (most logically, the name of the reviewed item). This has raised objections by implementers, and usually imposes a CSS-dependency to hide the repeated content. | |||
===Shared hCalendar Properties=== | ===Shared hCalendar Properties=== | ||
Yahoo! TV Listings marks up television programme listings using hCalendar. The <code>location</code> field of the event is the channel on which the show is broadcast: e.g. <code><span class='location'>BBC 1</span></code>. | Yahoo! TV Listings marks up television programme listings using hCalendar. The <code>location</code> field of the event is the channel on which the show is broadcast: e.g. <code><span class='location'>BBC 1</span></code>. | ||
Line 28: | Line 44: | ||
Repeating content is unacceptable, and the include-pattern is a messy, hacky mark-up pattern. Embracing the concept of the container would match the publishing pattern of the site, without repeating content or including invisible pointers. | Repeating content is unacceptable, and the include-pattern is a messy, hacky mark-up pattern. Embracing the concept of the container would match the publishing pattern of the site, without repeating content or including invisible pointers. | ||
'''ideally this markup proposal would be moved to the "markup proposals" section below, separate from the "Use Cases" section, so that multiple varying proposals could be grouped together to compare, rather than intermingling them with the list of use cases.''' | |||
.e.g. | .e.g. | ||
Line 59: | Line 77: | ||
This of course, extends the use of an existing container. | This of course, extends the use of an existing container. | ||
==Shared Aspects of Containers== | ==Shared Aspects of Containers== | ||
If containers become a more strongly adopted concept in microformats, they should behave consistently across formats (hence documenting these two examples here, rather than just as separate issues for both hReview and hCalendar). | If containers become a more strongly adopted concept in microformats, they should behave consistently across formats (hence documenting these two examples here, rather than just as separate issues for both hReview and hCalendar). | ||
Line 73: | Line 85: | ||
* Inheriting an property into a microformat item within the container | * Inheriting an property into a microformat item within the container | ||
* Contained items ''overriding'' one or more inherited property | * Contained items ''overriding'' one or more inherited property | ||
== markup proposals == | |||
=== hreview-set === | |||
One solution to the problem of multiple reviews of the same item could be to wrap each <code>hReview</code> in a container (hypothetically, <code>hreview-set</code>. The <code>item</code> is a child of the set, and is inherited by each <code>hreview</code> contained within. | |||
== see also == | |||
* [[hReview]] | |||
* [[hCalendar]] | |||
* [[hListing]] |
Revision as of 01:47, 11 June 2009
<entry-title>Containers</entry-title>
This page exists to brainstorm around the concept of ‘containers’ in microformats.
What's a Container?
A ‘container’ is a root element that contains multiple microformat items within it. It groups those items together, but could also be used to provide additional or shared semantics between those items.
Some microformats already define containers: vcalendar
hCalendar is a container for events, the hfeed
container in hAtom contains entries, hAudio has a concept whereby haudio
concepts may be nested, and an hCard vcard
may be a container for agent vcard
s.
Why is this being explored?
There are a number of use cases for making better use of these container semantics, both in microformats like hCalendar that already have containers, and hReview, where no current container concept exists.
examples
As always it helps to start with examples of markup from actual websites that are already publishing container semantics. If this section gets too large, perhaps we can move it to container-examples.
container of reviews
The following website(s) contain a list of reviews which could/would benefit from a way of marking up not just the reviews as hReviews, but also the set of them as reviewing the same item.
SustainLane
http://www.sustainlane.com/ has pages that show multiple reviews of the same item. e.g.
http://www.sustainlane.com/reviews/aziza/TVLWN4ZKQLKTOIKFLWKBWFQ17DN8
Yelp
http://yelp.com/ has pages that show multiple reviews of the same item. e.g.
http://www.yelp.com/biz/coffee-to-the-people-san-francisco
Use cases
Here are some example use cases for sharing properties from a container into multiple child microformats:
Multiple reviews of the same item
As demonstrated by the above real world examples, many sites publish a page for a single item, listing multiple reviews of that item (e.g. Amazon, Kelkoo, Yelp, Yahoo! Location etc.). The item appears once at the top of the page. The reviews follow. hReview's current requirement is that the item
be referenced from every review using the include-pattern. This requires duplicating some amount of content (most logically, the name of the reviewed item). This has raised objections by implementers, and usually imposes a CSS-dependency to hide the repeated content.
Yahoo! TV Listings marks up television programme listings using hCalendar. The location
field of the event is the channel on which the show is broadcast: e.g. <span class='location'>BBC 1</span>
.
- ‘BBC 1’ is the heading for that channels listing page. The information is published once in the page.
- Each scheduled programme on the page is a
vevent
- Using current hCalendar semantics, the
location
must be included in everyvevent
With the ‘BBC 1’ content at the top of the page, not part of the programme content, the content either has to be repeated and hidden in the presentation layer, or current microformats constructs such as the include-pattern need to be used to invisibly reference the original mention of ‘BBC 1’.
Repeating content is unacceptable, and the include-pattern is a messy, hacky mark-up pattern. Embracing the concept of the container would match the publishing pattern of the site, without repeating content or including invisible pointers.
ideally this markup proposal would be moved to the "markup proposals" section below, separate from the "Use Cases" section, so that multiple varying proposals could be grouped together to compare, rather than intermingling them with the list of use cases.
.e.g.
<div class='vcalendar'>
<h1 class='location'>BBC 2</h1>
<ul>
<li class='vevent'>
<h2 class='summary'>Gardener's World</h2>
<p class='dtstart'><span class='value-title' title='2009-06-05T20:30:00+0100'> </span> 8:30pm</p>
</li>
<li class='vevent'>
<h2 class='summary'>Have I Got News For You</h2>
<p class='dtstart'><span class='value-title' title='2009-06-05T21:00:00+0100'> </span> 9:00pm</p>
</li>
</ul>
</div>
Here, the location
is promoted to being a property of the vcalendar
, and is the default location for all the contained events.
This could also apply to the organizer
, attendees
, and others. With further explanation and date-time separation, you could event declare the day of the week the the vcalendar
and the time-of-day in the vevent
. The basic principal is illustrated, though.
Uses for this pattern:
- Broadcast listings for a single channel/station
- Concert listings at a single venue
- Concert listings for a single act (e.g. ‘Doves in Concert’ is the event
summary
for multiple events at differentlocations
)
This of course, extends the use of an existing container.
If containers become a more strongly adopted concept in microformats, they should behave consistently across formats (hence documenting these two examples here, rather than just as separate issues for both hReview and hCalendar).
Things that should be consistent and predictable:
- Inheriting an property into a microformat item within the container
- Contained items overriding one or more inherited property
markup proposals
hreview-set
One solution to the problem of multiple reviews of the same item could be to wrap each hReview
in a container (hypothetically, hreview-set
. The item
is a child of the set, and is inherited by each hreview
contained within.