RE: Flattening Microdata

It's too bad we're guessing about this.

Jeff

> -----Original Message-----
> From: Antonia Rosati [mailto:arosati@ucar.edu]
> Sent: Wednesday, August 08, 2012 12:08 PM
> To: LeVan,Ralph; Sandhaus, Evan; Public Vocabs
> Cc: mayernik@ucar.edu
> Subject: Re: Flattening Microdata
> 
> Ralph, I will back you up.
> 
> During my summer work in the NCAR library marking up metadata with RDF
> and schema.org, I came across a couple of "how-to" and "best practices"
> articles stating that schema.org cannot/should not be used strictly
> with the <meta> tag, and certainly not only in the header.
> 
> I wanted to do this for one of my case studies, but moved away from it
> (without experimenting) because of these recommendations. In the end,
> the only downfall I saw was that the HTML was less human-readable.
> 
> Toni Rosati
> NARCCAP User Community Liaison
> National Center for Atmospheric Research (NCAR) narccap@ucar.edu
> 
> On Wed, 8 Aug 2012 11:57:25 -0400
>   "LeVan,Ralph" <levan@oclc.org> wrote:
>   Evan, could you explain why you want to do this?
> 
> 
> 
>   My understanding is that this is discouraged behavior.  Search
> engines
>   don't trust metadata that isn't visible to users.  The library
> community
>   got very excited about using meta tags years ago and then discovered
>   that they were being ignored.
> 
> 
> 
>   Could someone else verify my understanding of the meta tag?
> 
> 
> 
>   Thanks!
> 
> 
> 
>   Ralph
> 
> 
> 
>   Ralph LeVan
> 
>   Research Scientist
> 
>   OCLC
> 
> 
> 
> From: Sandhaus, Evan [mailto:sandhes@nytimes.com]
>   Sent: Wednesday, August 08, 2012 11:44 AM
>   To: Public Vocabs
>   Subject: Flattening Microdata
> 
> 
> 
>   Hello all!
> 
> 
> 
>   I'm interested in 'flattening' schema.org <http://schema.org/>
>   object
>   markup into the <head> element using <meta> elements.  In theory one
>   should be able to use the "itemref" and "id" attributes to 'flatten'
> an
>   object hierarchy into a set of metatags - but in practice this leads
> to
>   unexpected results.
> 
> 
> 
> For example:
> 
> 
> 
>   Suppose we have a NewsArticle with the headline 'A Test Headline'
> that
>   has a creator that is a Person that has the name 'Evan S Sandhaus'
> and
>   the url 'http://sandha.us'.  Here is an example of how to flatten
> that
>   out in the <head> using id and itemref:
> 
> 
> 
>   <html itemid='the_article_id' itemscope
>   itemtype='http://schema.org/NewsArticle'>
> 
>                  <head>
> 
>                                  <!-- Article properties in global
> scope
>   -->
> 
>                                  <meta itemprop='headline' content='A
>   Test Headline'/>
> 
> 
> 
>                                  <!-- Author Properties Flattened with
>   itemref and ids -->
> 
>                                  <meta itemprop='creator' itemscope
>   itemtype='http://schema.org/Person' itemid='the_creator_id'
>   itemref='author_name author_url'/>
> 
>                                  <meta id='author_name'
> itemprop='name'
>   content='Evan S Sandhaus'/>
> 
>                                  <meta id='author_url' itemprop='url'
>   content='http://sandha.us' <http://sandha.us'/> /
> <http://sandha.us'/> >
> 
> 
>                  </head>
> 
>                  <body>
> 
>                  </body>
> 
>   </html>
> 
> 
> 
>   So that's the theory.
> 
> 
> 
>   In practice, however, both the Rich Snippets Tool and the Python
>   microdata libraries I'm using locally
>   (http://pypi.python.org/pypi/microdata) both insist on adding the
>   creator-specific properties to both the scope of both the creator and
>   the NewsItem.
> 
> 
> 
>   More concretely - my local tools give me this:
> 
>   [{
> 
>      "id": "the_article_id",
> 
>      "properties": {
> 
>          "creator": [{
> 
>              "id": "the_creator_id",
> 
>              "properties": {
> 
>                  "name": ["Evan S Sandhaus"],
> 
>                  "url": ["http://sandha.us <http://sandha.us/> "]
> 
>              },
> 
>              "type": "http://schema.org/Person"
> 
>          }],
> 
>          "headline": ["A Test Headline"],
> 
>          "name": ["Evan S Sandhaus"],
> 
>          "url": ["http://sandha.us <http://sandha.us/> "]
> 
>      },
> 
>      "type": "http://schema.org/NewsItem"
> 
>   }]
> 
> 
> 
>   And the Rich Snippets tool gives me this:
> 
>   Item
> 
>   Type: http://schema.org/newsarticle

>   headline = A Test Headline
>   creator = Item( 1 )
>   name = Evan S Sandhaus
>   url = http://sandha.us

> 
>   Item 1
> 
>   Type: http://schema.org/person

>   name = Evan S Sandhaus
>   url = http://sandha.us

> 
> 
> 
>   So the question is: is this expected behavior?  If so, is there
> anything
>   I could do besides this to "flatten" the markup into the <head>
> element?
> 
> 
> 
>   Thanks!
> 
> 
> 
>   ~Evan
> 
>   --
> 
>   Evan Sandhaus
> 
>   Lead Architect, Semantic Platforms
> 
>   The New York Times Company
> 
>   @kansandhaus
> 
> 
> 

Received on Thursday, 9 August 2012 01:27:29 UTC