[whatwg] Proposed simplification to Microdata

Guha guha at google.com
Thu May 26 12:02:02 PDT 2011


We are trying to simplify statement of a fairly common thing that crops up
with microdata

E.g.,

Consider the block:
1) <div itemscope itemtype=”http://schema.org/Book”>
      <span itemprop=”name”>The Catcher in the Rye</span> -
     by <span itemprop=”hasAuthor”>J.D. Salinger</span>
   </div>

Now, the site wants to use the wikipedia (or freebase) entry for Salinger,
just to be clear and wants the value of the  hasAuthor property to be an
item with that ID.
I believe the following says that:

2) <div itemscope itemtype=”http://schema.org/Book”>
      <span itemprop=”name”>The Catcher in the Rye</span> -
   by <a href="http://en.wikipedia.org/wiki/J._D._Salinger"
itemprop=”hasAuthor”>J.D.
Salinger</a>
   </div>

Often, the site does not want to link out to the wikipedia (or other
canonical url) page, but only specify
it in the microdata. This can be done by:

3) <div itemscope itemtype=”http://schema.org/Book”>
     <span itemprop=”name”>The Catcher in the Rye</span> -
   by <span itemscope
itemid="http://en.wikipedia.org/wiki/J._D._Salinger"
itemprop=”hasAuthor”>J.D.
Salinger</span>
  </div>

In this case, the page is saying nothing more about the object whose
canonical url is
http://en.wikipedia.org/wiki/J._D._Salinger. The itemscope really serves no
purpose.

We would like to propose that it be made legal to drop the itemscope in this
case.
We realize that it is just one term, but this also makes this case symmetric
with (2),
which helps with explaining/understanding microdata.

guha


More information about the whatwg mailing list