W3C home > Mailing lists > Public > public-vocabs@w3.org > February 2012

Re: Multiple "Products" per page, one product Title

From: Aaron Bradley <aaranged@yahoo.com>
Date: Thu, 23 Feb 2012 13:41:52 -0800 (PST)
Message-ID: <1330033312.25320.YahooMailNeo@web161002.mail.bf1.yahoo.com>
To: "Ziarek, Nathan" <NZiarek@asq.org>, "public-vocabs@w3.org" <public-vocabs@w3.org>
Might this syntax work?  It looks pretty good to me on both the Rich Snippets Testing Tool and the Linter (after many, many failures to see the offer properly associated with the format:):


<div itemscope itemtype="http://schema.org/Book">

<span itemprop="name">The Catcher in the Rye</span> -
by <a itemprop="author" href="/author/jd_salinger.html">J.D. Salinger</a>

<div itemprop="bookFormat" itemscope itemtype="http://schema.org/Book">
<span itemprop="BookFormatType">Paperback</span>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
  Price: <span itemprop="price">$6.99</span>
  <meta itemprop="priceCurrency" content="USD" />
</div>
</div>

<div itemprop="bookFormat" itemscope itemtype="http://schema.org/Book">
<span itemprop="BookFormatType">Hardcover</span>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
  Price: <span itemprop="price">$16.99</span>
  <meta itemprop="priceCurrency" content="USD" />
</div>
</div>


Though of course, if this syntax is valid (certainly not guaranteeing that:) it would increasingly complicated to add other Book attributes specifically for the types Paperback and Hardcover (e.g. number of pages, ISBN).  Though this does allow you to have a single entry for any of the book's shared attributes (e.g. title, author).

I'm glad you brought this up, and I hope others weigh in, because it's an extremely common situation:  a thing may have properties shared by all offers, but specific offers vary according to one or more specific properties of the thing.  A hotel room that has a different price to stay on Saturday than on Wednesday, but is still the same hotel room; a used car that has a different price depending on condition, but is still the same make, model and year; an MP3 player that has different availability based on color, but is still the same make and model of MP3 player; and so on.


[1] http://www.google.com/webmasters/tools/richsnippets
[2] http://linter.structured-data.org/



> From: "Ziarek, Nathan" <NZiarek@asq.org>
>To: "public-vocabs@w3.org" <public-vocabs@w3.org> 
>Sent: Friday, January 27, 2012 12:36:10 PM
>Subject: Multiple "Products" per page, one product Title
> 
>I'm sure this has already been covered, and would appreciate any pointers to where. I'm proud to report I did search. I'm sad to say my searching skills are sub-par.
>
>* * *
>
>I have a book page. The <h1> at the top if the book title. Below that is a list of formats (hardcover, softcover, spiral bound) and then, finally, ancillary details like author, ISBN and rating.
>
><h1>Great Book</h1>
>
><!--Formats-->
><div>Hard cover, $30</div>
><div>Softcover, $20</div>
>
><!--Other Data-->
><div>Joe Schmoe</div>
><div>3.5 / 5</div>
>
>My confusion is this:
>
>I feel as if, semantically, the "Formats" are really the Product or Book object, since they actually represent the good. However, if I scope them as the product, then I'm stuck duplicating Author, title, rating, etc information and hiding it within those DIVs.
>
>On the other hand, if I scope the entire page as the book and each format as an Offer, then I seem (?) to miss out on applying the specific book properties (bookFormat, numberOfPages).
>
>* * *
>
>Am I considering this correctly? Maybe these are just the tradeoffs, but I feel as if I (or MUCH more likely the whole schema.org organization :) am missing a crucial concept in the scoping.
>
>Best,
>Nate
>
>
Received on Thursday, 23 February 2012 21:42:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 06:48:59 GMT