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 14:00:00 +0200
Message-ID: <e2c275120910190500k125ed874yc307010279f63c28@mail.gmail.com>
To: Philip Jägenstedt <philipj@opera.com>
Cc: Nicholas Stimpson <nicholas.stimpson@ntlworld.com>, public-html@w3.org
On Mon, Oct 19, 2009 at 1:42 PM, Philip Jägenstedt <philipj@opera.com> wrote:
> On Mon, 19 Oct 2009 13:20:07 +0200, Olivier GENDRIN
> <olivier.gendrin@gmail.com> wrote:
>> Ho, I have an even more problematic example in mind :
>>
>> <table>
>>  <tbody>
>>    <tr>
>>      <itemref refid="x">
>>        <td itemprop="b">test</td>
>>        <td itemprop="a">2</td>
>>      </itemref>
>>    </tr>
>>    <!-- repeat scheme -->
>>  </tbody>
>> </table>
>> <div id="x"><p itemprop="a">1</p></div>
>> <!-- repeat scheme -->
>
> I'm not sure I'm getting the problematic part, but a property can have
> multiple values, which is why
> HTMLPropertyCollection.namedItem('propname').values is an array rather than
> a single value. [1] If you mean that id="x" should be repeated, only the
> first such element is used.
>
> [1]
> http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#htmlpropertycollection

No, I did not mean that you have to have duplicate ids (brrrrr), I was
pointing out table handling in browsers, that would get the <itemref
/> out of the <table> element.

http://software.hixie.ch/utilities/js/live-dom-viewer/?%3Ctable%3E%0A%20%3Ctbody%3E%0A%20%20%20%3Ctr%3E%0A%20%20%20%20%20%3Citemref%20refid%3D%22x%22%3E%0A%20%20%20%20%20%20%20%3Ctd%20itemprop%3D%22b%22%3Etest%3C%2Ftd%3E%0A%20%20%20%20%20%20%20%3Ctd%20itemprop%3D%22a%22%3E2%3C%2Ftd%3E%0A%20%20%20%20%20%3C%2Fitemref%3E%0A%20%20%20%20%20%3Citemref%20refid%3D%22x2%22%3E%0A%20%20%20%20%20%20%20%3Ctd%20itemprop%3D%22b%22%3Etest%3C%2Ftd%3E%0A%20%20%20%20%20%20%20%3Ctd%20itemprop%3D%22a%22%3E2%3C%2Ftd%3E%0A%20%20%20%20%20%3C%2Fitemref%3E%0A%20%20%20%3C%2Ftr%3E%0A%20%20%20%3C!--%20repeat%20scheme%20--%3E%0A%20%3C%2Ftbody%3E%0A%3C%2Ftable%3E%0A%3Cdiv%20id%3D%22x%22%3E%3Cp%20itemprop%3D%22a%22%3E1%3C%2Fp%3E%3C%2Fdiv%3E%0A%3Cdiv%20id%3D%22x2%22%3E%3Cp%20itemprop%3D%22a%22%3E1%3C%2Fp%3E%3C%2Fdiv%3E%0A%3C!--%20repeat%20scheme%20--%3E

Extract with FF3.5 :
# BODY
    * ITEMREF refid="x"
          o #text:
    * ITEMREF refid="x2"
          o #text:
    * TABLE

In IE7 (note the creation of a new tag </ITEMREF />) :
# TR
    * ITEMREF refid="x"
    * TD itemprop="b"
        #text: test
    * TD itemprop="a"
        #text: 2
    * /ITEMREF

In Opera 10 :
# TR
    * ITEMREF refid="x"
    * TD itemprop="b"
        #text: test
    * TD itemprop="a"
        #text: 2

In Safari 4.0.3 (windows) :
# BODY
    * ITEMREF refid="x"
          o #text:
    * ITEMREF refid="x2"
          o #text:
    * TABLE

--
Olivier G.
http://identi.ca/lespacedunmatin
http://www.lespacedunmatin.info/blog/
Received on Monday, 19 October 2009 12:00:47 GMT

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