W3C home > Mailing lists > Public > public-html@w3.org > October 2009

Re: Microdata: The Itemref element

From: Olivier GENDRIN <olivier.gendrin@gmail.com>
Date: Mon, 19 Oct 2009 15:33:00 +0200
Message-ID: <e2c275120910190633o5d0e71a1h6195ce6942da3c6d@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Philip Jägenstedt <philipj@opera.com>, Nicholas Stimpson <nicholas.stimpson@ntlworld.com>, public-html@w3.org
On Mon, Oct 19, 2009 at 3:08 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> You're using <itemref> incorrectly, though.  I don't understand what
> you're even trying to do in this example.  <itemref> is a void element
> (doesn't contain anything, doesn't have an end tag).  There's nothing
> with @itemscope to actually define a microdata item.  This whole
> example is very incorrect, so it doesn't really matter that table
> magic screws it up.

Damn, you're right, I'm too used to the xhtml notation.

Ok, having read the spec, I refine my example :


<div id="x"><p itemprop="a">1</p>
  <div>
    <p itemprop="b">test</p>
    <p itemprop="a">2</p>
    <itemref refid="y">
    <table>
     <tbody>
       <tr>
         <itemref refid="x">
           <td itemprop="b">test</td>
           <td itemprop="a">2</td>
         </itemref>
       </tr>
     </tbody>
    </table>
  </div>
  <div id="y"><p itemprop="a">1</p>
</div>

Would lead in Safari 4 and FF3.5 to a DOM equivalent to :

<div id="x"><p itemprop="a">1</p>
  <div>
    <p itemprop="b">test</p>
    <p itemprop="a">2</p>
    <itemref refid="y">
    <itemref refid="x">
    <table>
     <tbody>
       <tr>
           <td itemprop="b">test</td>
           <td itemprop="a">2</td>
         </itemref>
       </tr>
     </tbody>
    </table>
  </div>
  <div id="y"><p itemprop="a">1</p>
</div>

(if i'm not making a huge mistake)

-- 
Olivier G.
http://identi.ca/lespacedunmatin
http://www.lespacedunmatin.info/blog/
Received on Monday, 19 October 2009 13:33:54 GMT

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