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

Re: Microdata: The Itemref element

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 19 Oct 2009 02:38:56 -0700
Message-ID: <63df84f0910190238g8676a18t58c200502ca82af8@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: Ian Hickson <ian@hixie.ch>, Nicholas Stimpson <nicholas.stimpson@ntlworld.com>, public-html@w3.org
On Mon, Oct 19, 2009 at 1:35 AM, Anne van Kesteren <annevk@opera.com> wrote:
> On Sun, 18 Oct 2009 23:59:01 +0200, Ian Hickson <ian@hixie.ch> wrote:
>> On Sun, 18 Oct 2009, Nicholas Stimpson wrote:
>>> Instead, would it be possible for the element with the "itemscope"
>>> attribute to have an itemref attribute that was a space separated list
>>> of ids?
>> It'd certainly be possible, but I'm not sure it's desireable, given how
>> easy it is to work around.
> FWIW, that design sounds much nicer to me than having an <itemref> element
> somewhere as a descendant do the trick. It is more clear what the
> relationship is, does not have legacy parser issues, is easier to implement
> using scripting, and more consistent with other such structures (usemap,
> for).

Agreed. I also like the idea of microdata being purely a set of
attributes. Mostly because it keeps the markup more readable IMHO. An
element attracts a lot more attention when skimming over markup than
an attribute does. Especially if the markup is written for readability


And I think it's better that the main document structure is what
attracts attention, rather than being distracted by microdata markup.

Further, not having to change the element structure of the document in
order to add microdata makes it somewhat safer to add since there's
much less reason to worry about scripts that expects a certain DOM
structure breaking.

Neither of the two suggested workarounds are particularly nice:

1. Wrapping a <span> around the <itemref> means that microdata
attracts even more attention when writing the markup.
2. Putting the <itemref>s last in an element seems opposite from where
you'd intuitively put them. It seems to me more intuitive to put them
close to where the item is declared, i.e. the 'itemscope' attribute.

/ Jonas
Received on Monday, 19 October 2009 09:39:51 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:53 UTC