W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2011

[whatwg] Microdata getItems()

From: Rob Crowther <robertc@boogdesign.com>
Date: Tue, 09 Aug 2011 15:14:52 +0100
Message-ID: <4E4140DC.5030500@boogdesign.com>
I just want to confirm that my understanding of this is correct: 
getItems() will return a NodeList of top level microdata items and this 
is irrespective of whether or not the items are actually valid in terms 
of their type?  That is, it is the developer's responsibility to confirm 
that the vCard has an fn and an n before further processing?

It makes sense to me because I don't expect the browser to be 
downloading random vocabularies off the internet to check these things, 
but it doesn't seem to be explicitly referenced in the spec.  There is a 
section which talks about de-referencing says that the browser can 
dereference the URL to provide item specific processing, but only if the 
applicable specification allows it.

One further question - if an itemtype attribute is present there must 
also be an itemscope.  However if I remove itemscope from the element 
the Opera beta implementation still returns it as a top level microdata 
item even though it is now invalid.  Is this expected behaviour?

Rob
Received on Tuesday, 9 August 2011 07:14:52 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:35 UTC