W3C home > Mailing lists > Public > public-vocabs@w3.org > June 2013

looking for explanation about an extensive ItemList

From: Jarno van Driel <jarno@quantumspork.nl>
Date: Sat, 8 Jun 2013 01:48:30 +0200
Message-ID: <CAFQgrbb9HDxQ0yEKzrXixmLfJMHTRJW9c_8RfXw_Hq1iyoHB9w@mail.gmail.com>
To: public-vocabs@w3.org
Hey folks,

I've asked around on the Google Webmaster forum and several semantics
communities out there but nobody seems to be able to help me out.
I need some help understanding how to markup a
http://schema.org/ItemListwhich contains items (for this example
http://schema.org/Product). Now I'm not just looking for the right code
here, I'm looking to really *understand *the theory here, so
I'm going to try to clarify certain cases and questions with code snippets
in the hope somebody can point out to me which is correct and most of all
why, so forgive me if this topic gets to be quite the read.

The theory:

   - If I look at http://schema.org/docs/gs.html#microdata_embedded, it
   says: '*Sometimes* the value of an item property can itself be another
   item with its own set of properties.' Which is clarified with the following
   markup example:
   <div itemprop="director" itemscope itemtype="http://schema.org/Person">
   - If I look at http://schema.org/WebPage and look at itemprop="text", it
   says: 'the expected value is Text'.
   - If I look at http://schema.org/ItemList and look at
   itemprop="itemListElement", it says: 'the expected value is Text'.

Looking at the sources at schema.org this would imply I can treat
itemprop="text" and itemprop="itemListElement" the same way, since for both
the expected value is 'Text.'

------------------------------

*Case 1*
Taking the mentioned theory (*Sometimes* the value of an item property can
itself be another item) into account and to create a
http://schema.org/ItemPage about a http://schema.org/Product that generates
a rich snippet (Structured Data Testing
tool<http://www.google.com/webmasters/tools/richsnippets>)
I will typically code something like this (be aware, the markup is
simplified for the examples mentioned in this topic):

<!DOCTYPE html>
<html>
  <head>
    <title>page title</title>
  </head>

  *<body itemscope itemtype="http://schema.org/ItemPage">*
    *<div itemprop="text">*
      *<div itemscope itemtype="http://schema.org/Product">*
        <h1 itemprop="name">Product name</h1>

        <p itemprop="description">
          Nec, urna tristique elit diam adipiscing ac adipiscing nunc sed
magna, adipiscing et lectus, nunc scelerisque.
        </p>

        <p itemprop="offers" itemscope itemtype="http://schema.org/Offer">
          <meta itemprop="priceCurrency" content="EUR" />
          <span itemprop="price">99,99</span>
        </p>
      *</div>*
    *</div>*
  </body>
</html>

Here the itemprop="text" *value *is the itemtype="http://schema.org/Product".
The itemprop="text" itself isn't an item. According to the specs as I
interpret them from http://schema.org/WebPage.

Now if it's true that I can treat itemprop="text" and
itemprop="itemListElement" the same way, marking up a
http://schema.org/CollectionPage with a http://schema.org/ItemList of *
products,* the theory leads me to create markup like this:

<!DOCTYPE html>
<html>
  <head>
    <title>page title</title>
  </head>

  *<body itemscope itemtype="http://schema.org/ <http://schema.org/ItemPage>
**CollectionPage <http://schema.org/CollectionPage>**">*
    *<div itemprop="text">*
      *<div itemscope itemtype="http://schema.org/ItemList">*
        <meta itemprop="itemListOrder" content="Descending" />
        <h1 itemprop="name">name text</h1>

        <ul>
          *<li itemprop="itemListElement">*
            *<div **itemscope itemtype="http://schema.org/Product">*
              <h2>
                <a itemprop="url" href="http://example.com" title="title
text">
                  <span itemprop="name">name text</span>
                </a>
              </h2>

              <img itemprop="image" src="some-image.jpg" alt="alt text"
title="title text" />

              <p itemprop="description">description text</p>
            *</div>*
          *</li>*

          *<li itemprop="itemListElement">*
            *<div **itemscope itemtype="http://schema.org/Product">*
              <h2>
                <a itemprop="url" href="http://example.com" title="title
text">
                  <span itemprop="name">name text</span>
                </a>
              </h2>

              <img itemprop="image" src="some-image.jpg" alt="alt text"
title="title text" />

              <p itemprop="description">description text</p>
            *</div>*
          *</li>*
        </ul>
      *</div>*
    *</div>*
  *</body>*
</html>

*My questions here are:*

   - Is it correct that the properties 'text' and 'itemListElement' can
   only have an item as value but can not be an item?
   - Am I correct in assuming I can treat itemprop="text" and
   itemprop="itemListElement" the same way?
   - Is the markup provided for the ItemPage containing a Product correct?
   - Is the markup provided for the CollectionPage containing an ItemList
   of Products correct?

------------------------------
*
*
*Case 2*
If I parse the code of the ItemPage, as mentioned in case 1, though the
Structured Data Testing tool, the Extracted structured data ends up showing
some Items without numbering. These are the items that are the values of
the item properties 'text' and 'itemListElement'. Let's call these
'floating items' for the moment. The way I see it, these items aren't bound
to the WebPage and fall out of its 'flow'. (by lack of knowing the proper
terms I'm using my own vocabulary here) since they're only values and
therefore are not bound properly (for triple's sake).

This lead me to think this is where itemprop="about" comes into play. Since
its expected value is a 'Thing' that declares the subject matter of the
content.

To create a http://schema.org/ItemPage about a
http://schema.org/Product without
having 'floating items' in the Extracted structured data, I came up with
this:

<!DOCTYPE html>
<html>
  <head>
    <title>page title</title>
  </head>

  *<body itemscope itemtype="http://schema.org/ItemPage">*
    *<div itemprop="text">*
      *<div **itemprop="about**" itemscope itemtype="
http://schema.org/Product">*
        <h1 itemprop="name">Product name</h1>

        <p itemprop="description">
          Nec, urna tristique elit diam adipiscing ac adipiscing nunc sed
magna, adipiscing et lectus, nunc scelerisque.
        </p>

        <p itemprop="offers" itemscope itemtype="http://schema.org/Offer">
          <meta itemprop="priceCurrency" content="EUR" />
          <span itemprop="price">99,99</span>
        </p>
      *</div>*
    *</div>*
  </body>
</html>

In my perception this seems correct yet it doesn't produce a rich snippet.
So I thought that maybe declaring both the 'text' and 'about' was causing a
conflict and tried the same without making use of the itemprop="text" and
just the 'about' property but without success. Still no rich snippet

To supplement the example I applied the same way of thinking to create a
http://schema.org/CollectionPage with a http://schema.org/ItemList of *
products,* without having 'floating items' in the Extracted structured data
and came up with this markup:

<!DOCTYPE html>
<html>
  <head>
    <title>page title</title>
  </head>

  *<body itemscope itemtype="http://schema.org/ <http://schema.org/ItemPage>
**CollectionPage <http://schema.org/CollectionPage>**">*
    *<div itemprop="text">*
      *<div itemscope itemtype="http://schema.org/ItemList">*
        <meta itemprop="itemListOrder" content="Descending" />
        <h1 itemprop="name">name text</h1>

        <ul>
          *<li itemprop="itemListElement">*
            *<div** **itemprop="about**"** **itemscope itemtype="
http://schema.org/Product">*
              <h2>
                <a itemprop="url" href="http://example.com" title="title
text">
                  <span itemprop="name">name text</span>
                </a>
              </h2>

              <img itemprop="image" src="some-image.jpg" alt="alt text"
title="title text" />

              <p itemprop="description">description text</p>
            *</div>*
          *</li>*

          *<li itemprop="itemListElement">*
            *<div** **itemprop="about**"** **itemscope itemtype="
http://schema.org/Product">*
              <h2>
                <a itemprop="url" href="http://example.com" title="title
text">
                  <span itemprop="name">name text</span>
                </a>
              </h2>

              <img itemprop="image" src="some-image.jpg" alt="alt text"
title="title text" />

              <p itemprop="description">description text</p>
            *</div>*
          *</li>*
        </ul>
      *</div>*
    *</div>*
  *</body>*
</html>

*My questions here are:*

   - Is it even necessary to prevent 'floating' items?
   - Does it matter for the semantics and how that both 'text' and 'about'
   properties are used in this matter?
   - Where does my line of thought go wrong (since there is no rich snippet
   I asume my way of thinking is false here)?
   The 'text' properties says: 'Hello world, my-[WebPage] text-value is
   [this]' and the 'about' property says: 'Hello world, I-[WebPage] am about
   [this]'. Doesn't that really mean the same?
   - Is there a way to make use of itemprop="about" in conjunction with an
   item (this case http://schema.org/Product) that still generates a rich
   snippet?

------------------------------

*Case 3*
More or less a dozen people pointed out to me that my markup for the
ItemList mentioned in case 1 is wrong. They said that instead of having the
itemprop='itemListElement' *value* be an item I should have the
itemprop='itemListElement' itself be an item.

Now this is goes against the way I interpret the specs at http://schema.org,
but according to those people it is in accordance with the microdata rules.
They stated (summarising here) that to create the proper 'Triple' the value
of an item property itself can *always* be another item. Unfortunately,
except http://schema.org, I can't find any (microdata) documentation which
denies nor confirms their claims. You could maybe argue that in that case I
should simply follow the specs at schema.org, yet if about 50%-60% of the
people you discuss an issue like this with, say otherwise, there has to be
something iffy.

Now if I markup a http://schema.org/ItemPage about a
http://schema.org/Product, taking their position (the value of an item
property itself can *always* be another item) into account, you get this:

<!DOCTYPE html>
<html>
  <head>
    <title>page title</title>
  </head>

  *<body itemscope itemtype="http://schema.org/ItemPage">*
    *<div itemprop="text" itemscope itemtype="http://schema.org/Product">*
      <h1 itemprop="name">Product name</h1>

      <p itemprop="description">
        Nec, urna tristique elit diam adipiscing ac adipiscing nunc sed
magna, adipiscing et lectus, nunc scelerisque.
      </p>

      <p itemprop="offers" itemscope itemtype="http://schema.org/Offer">
        <meta itemprop="priceCurrency" content="EUR" />
        <span itemprop="price">99,99</span>
      </p>
    *</div>*
  *</body>*
</html>

Putting this code though the Structured Data Testing
tool<http://www.google.com/webmasters/tools/richsnippets>
 and looking at the *Extracted structured data *everything may seam ok yet
a rich snippet isn't generated. Which makes sense to me, since it goes
against the http://schema.org specifications, but does comply with
microdata rules as they have been explained to me several times now.

Taking the same position (the value of an item property itself can *always* be
another item) into account, marking up a http://schema.org/CollectionPage with
a http://schema.org/ItemList of *products,* leads me to create something
like this:

<!DOCTYPE html>
<html>
  <head>
    <title>page title</title>
  </head>

  <body itemscope itemtype="*http://schema.org/ <http://schema.org/ItemPage>
**CollectionPage <http://schema.org/CollectionPage>*">
    *<div itemprop="text" itemscope
itemtype="http://schema.org/<http://schema.org/ItemList>
**ItemList <http://schema.org/ItemList>**">*
      <meta itemprop="itemListOrder" content="Descending" />
      <h1 itemprop="name">name text</h1>

      <ul>
        *<li itemprop="itemListElement" itemscope itemtype="
http://schema.org/Product">*
          <h2>
            <a itemprop="url" href="http://example.com" title="title text">
              <span itemprop="name">name text</span>
            </a>
          </h2>

          <img itemprop="image" src="some-image.jpg" alt="alt text"
title="title
text" />

          <p itemprop="description">description text</p>
        *</li>*

        *<li itemprop="itemListElement" itemscope itemtype="
http://schema.org/Product">*
          <h2>
            <a itemprop="url" href="http://example.com" title="title text">
              <span itemprop="name">name text</span>
            </a>
          </h2>

          <img itemprop="image" src="some-image.jpg" alt="alt text"
title="title
text" />

          <p itemprop="description">description text</p>
        *</li>*
      </ul>
    *</div>*
  </body>
</html>

*My questions here are:*

   - is it true that according to microdata rules, the value of an item
   property itself can *always* be another item? If so, why does
schema.orgthan go against those rules and is there a summary somewhere
that shows
   where schema.org deviates from microdata?
   - If the markup provided for the ItemPage containing a Product is
   correct, why doesn't the Structured Data Testing Tool show a rich snippet?
   - Is it true an itemListElement can be an item itself?

------------------------------
Good, you made it until here, thanks for staying with me until this point.

I know I present three cases here but I couldn't find a shorter -more
explicative- manner to ask my questions without loosing the correlation
between the cases, so please be gentle with me. ;-)

I hope any of you can shed some light on the matter because I don't know
where else to go anymore. There is simply too little information available
for markup like this. It would be very nice if schema.org would offer
more extensive examples because almost any example I find on the internet
is simply to basic or doesn't provide sources on which the markup is based
- making it a person opinion instead of fact.

Now bring it on!
Received on Saturday, 8 June 2013 01:26:50 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:29:28 UTC