Re: noted 3 issues re: time/data (was Re: minutes for HTML WG f2f, 2011-11-04, part 1)

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