W3C home > Mailing lists > Public > public-html@w3.org > April 2010

Re: microdata: the properties of an item

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 6 Apr 2010 23:56:36 +0000 (UTC)
To: Philip J├Ągenstedt <philipj@opera.com>
Cc: HTML WG <public-html@w3.org>
Message-ID: <Pine.LNX.4.64.1004062209020.4772@ps20323.dreamhostps.com>
On Wed, 3 Feb 2010, Philip J├Ągenstedt wrote:
>
> http://dev.w3.org/html5/md/#the-properties-of-an-item
> 
> The recent changes to this definition go a bit overboard in throwing 
> away properties in order to prevent itemref loops.

Yes.

I've removed the failure when an itemprop is referenced twice, as in some 
of your examples:

> <div itemscope itemref="x">
> <div id="x" itemprop="p">foo</div>
> </div>
>
> (easy to get if you rearrange your markup a bit after adding microdata)
>
> <div itemscope itemref="x x"></div>
> <div id="x" itemprop="p">foo</div>
>
> (much like duplicate class names, probably easy to get with 
> machine-generated markup)

...so those will now work.

I've also made it so that when you're looking at an item, any properties 
that reference that item again (directly or indirectly) are dropped. This 
solves problems like:

   <div itemscope itemref=x></div>
   <div id=x>
    <p itemprop=x itemscope>
     <span itemprop=x itemscope itemref=x></span>
    </p>
    <p itemprop=y></p>
   </div>

This will now generate one top-level item with one property (y), and if 
you somehow get hold of the two other elements with an itemscope and ask 
for their properties, the first one will have no properties and the second 
will have one (y).

Is this lenient enough? It seems rather arbitrary to me (you get different 
parts of the graph depending on where you start).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 6 April 2010 23:57:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:07 GMT