W3C home > Mailing lists > Public > public-vocabs@w3.org > November 2011

Re: Schema.org and nested items

From: Jocelyn Fournier <jocelyn.fournier@googlemail.com>
Date: Mon, 14 Nov 2011 20:29:26 +0100
Message-ID: <4EC16C16.6060503@gmail.com>
To: public-vocabs@w3.org, aaranged@yahoo.com
Hi,

Thanks for your reply !
Actually, you could consider the title which is in the head section as a 
visible element since it's displayed by the navigator ;)

 From my point of view, the classic meta title and description of an 
HTML page are matching quite well the itemprop "name" and "description" 
of a "http://schema.org/WebPage" element, that's why I've put the 
itemtype="WebPage" on the html tag, and not on the body tag.
Anyway, I'll move the itemtype on the body and see what's happening.

Any opinion on the "mainContentOfPage" vs "about" choice ?


Thanks,
   Jocelyn Fournier

Le 14/11/11 19:26, Aaron Bradley a écrit :
> Hmm.  I've seen<body>  declared as itemscope before (and I use this to declare itemtype="WebPage") but I honestly don't know if the DOM model permits marking up the<html>  tag itself.  On the other hand, I've replicated some of your code and it does seem to validate in the linter (http://linter.structured-data.org/).  Regarding the failure to produce a likely rich snippet, this could either be your code, or the tool's notoriously parsimonious generation of actual rich snippet previews.
>
> Note this comment from Google Employee Jenny Murphy on someone using a similar construction:
>
> "A div is a better place to put schema.org markup than the html element. It's designed to be applied to visible
> contents of your page so as a result you don't need to put it any
> further back than the<body>  element."
> http://www.google.com/support/forum/p/Webmasters/thread?tid=75bd26a38767e0cc&hl=en
>
> And again here:
>
> "Next, the schema.org markup should be applied to visible elements on the page. This means
> you should add them to existing elements that are part of the page's
> body (do not create new HTML elements in most cases). The root-most
> element you can apply them to is the<body>  start tag."
> http://www.google.com/support/forum/p/Webmasters/thread?tid=425b378f168b4bca&hl=en
>
> You might do well to check out Mark Pilgrim's chapter on microdata on "Dive Into HTML5" which has an entire section labeled "Marking Up People":
> http://diveintohtml5.ep.io/extensibility.html
>
> Hope this helps,
> Aaron Bradley
>
>> ________________________________
>> From: Jocelyn Fournier<jocelyn.fournier@googlemail.com>
>> To: public-vocabs@w3.org
>> Sent: Sunday, November 13, 2011 4:44:07 PM
>> Subject: Schema.org and nested items
>>
>> Hi,
>>
>> Initially, my "profile" pages was described with only a http://schema.org/person itemtype and all the needed information inside.
>> The google rich snippet testing tool was corrected recognizing my tags, and was displaying for example the picture of the person.
>>
>>
>> E.g. :
>>
>> <html itemscope="itemscope" itemtype="http://schema.org/Person";>
>> [...]
>> </html>
>>
>> However, I've recently changed the structure of my pages to do something more logical (at least for me) :
>>
>>
>> <html itemscope="itemscope" itemtype="http://schema.org/ProfilePage";>
>>      [...]
>>      <div itemprop="about" itemscope="itemscope" itemtype="http://schema.org/Person";>
>>          [...]
>>      </div>
>>      [...]
>> </html>
>>
>> The structure is properly recognized by google rich snippets testing tool, but it doesn't display any excerpt :
>>
>> http://www.google.com/webmasters/tools/richsnippets?url=http%3A%2F%2Fwww.wiktik.com%2Fprofil%2Flea-bourratiere-47&view=
>>
>> I'm doing something wrong, or it's just the rich snippets tool which is not able to render it properly ?
>>
>>
>>
>> Last question :
>>
>> Would it more sense to write this :
>>
>> <html itemscope="itemscope" itemtype="http://schema.org/ProfilePage";>
>>      [...]
>>      <div itemprop="mainContentOfPage" itemscope="itemscope" itemtype="http://schema.org/WebPageElement";>
>>          <div itemprop="about" itemscope="itemscope" itemtype="http://schema.org/Person";>
>>              [...]
>>          </div>
>>      </div>
>>      [...]
>> </html>
>>
>> or it's just basically the same ?
>>
>> Thanks and regards,
>>
>> -- Jocelyn Fournier
>> www.wiktik.com
>>
>>
>>
>>
>
Received on Monday, 14 November 2011 19:30:07 GMT

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