Re: Microdata: The Itemref element

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 UTC