[Bug 13007] should (resolved) itemid be unique within a document?

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13007

--- Comment #12 from Manu Sporny <msporny@digitalbazaar.com> 2011-06-22 02:41:32 UTC ---
(In reply to comment #11)
> If you want two items with different types but the same values, do something
> like this:
> 
> <meta itemscope itemtype="http://schema.org/WebPage" itemref="foo">
> <meta itemscope itemtype="http://schema.org/BlogPost" itemref="foo">
> <span id=foo>
>   <span itemprop=name>My Website and Blog</span>
>   <a itemprop=url href="http://example.org/post-4">permalink</a>
> </span>
> 
> This will produce two Microdata items, one of each type, both carrying the same
> 'name' and 'url' properties.  You can give either or both of them an @itemid as
> well, if you need to.

That's better, but still not ideal. As I stated above, I'd like to specify that
something (one item) has two types - Blog and WebPage. It's fairly simple to do
in RDFa 1.1:

<div vocab="http://schema.org/" about="#myblog" typeof="WebPage Blog">
  <span property="name">My Website and Blog</span>
  <a rel="url" href="http://example.org/post-4">permalink</a>
</div>

which results in the following triples:

<#myblog> rdf:type <http://schema.org/Blog> .
<#myblog> rdf:type <http://schema.org/WebPage> .
<#myblog> <http://schema.org/name> "My Website and Blog" .
<#myblog> <http://schema.org/url> <http://example.org/post-4> .

It is /possible/ to do this in Microdata, but the RDF is the only part that is
correct. If you use @itemref, you get one item with the properties listed
above. However, the JSON output lists two items, and that's inconsistent and
strange. The guys at Google that work on schema.org seem to be telling people
to do the thing that gives you the proper RDF, but when people go to extract
this data using the Microdata API, they may be very surprised that all of the
data isn't there:

http://groups.google.com/group/schemaorg-discussion/msg/011c3a8ddd146a9a

I am asserting that the data returned in the RDF and the data returned by the
Microdata DOM API (JSON) should not surprise developers like this. This is
because Google, Microsoft and Yahoo Search are going to see one thing and
applications that use the DOM are going to see something else. It also forces
developers to have to write extra code to map between the JSON and the RDF
representations of the same data in Microdata.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Wednesday, 22 June 2011 02:41:35 UTC