Re: Microdata: The Itemref element

On Mon, Oct 19, 2009 at 7:00 AM, Olivier GENDRIN
<olivier.gendrin@gmail.com> wrote:
> 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.

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.

~TJ

Received on Monday, 19 October 2009 13:09:28 UTC