- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 14 Nov 2011 00:23:34 -0800
- To: "Marat Tanalin | tanalin.com" <mtanalin@yandex.ru>
- Cc: Tantek Çelik <tantek@cs.stanford.edu>, Sam Ruby <rubys@intertwingly.net>, public-html@w3.org
On Mon, Nov 14, 2011 at 12:09 AM, Marat Tanalin | tanalin.com <mtanalin@yandex.ru> wrote: > Looks like an equation with key thing missing -- a variable. It's still unclear what is advantage of a dedicated DATA element over an attribute for existing one (like SPAN in simplest case). > > Let's consider an example: > <data itemprop="foo" value="bar">ipsum</data> > > It's unclear why this is not sufficient instead: > <span itemprop="foo" value="bar">ipsum</span> Please tell me what the value of the "foo" property is on the following element: <span itemprop="foo" itemvalue="bar" itemscope> Is it the string "bar"? Or is it the Microdata item started on the element? Microdata already has three places that a value can possible come from - the textual content, the value of an attribute on certain elements, and the Microdata item started on the element. There's a somewhat intuitive ordering to these, but it's still right on the border of being too complex for its own good. Adding a *fourth* source of values that you have to remember the ordering of shouldn't be done unless there's a *really* good reason for it. Here, there isn't - we can add a <data> element and everything stays easy, since <data> is just another one of the "certain elements" that draws its Microdata value from an attribute by default. (There's no technical reason for <data>, since <meta> fills the same role, but people find it unintuitive to use since it doesn't "wrap" the human-readable version of the data.) ~TJ
Received on Monday, 14 November 2011 08:24:33 UTC