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

2011/11/14 Marat Tanalin | tanalin.com <mtanalin@yandex.ru>:
> 14.11.2011, 19:38, "Tab Atkins Jr." <jackalmage@gmail.com>:
>
>>>  If to consider syntax with 'itempropvalue' attribute (as I've mentioned earlier and in the bug 14679 comment 3):
>>>
>>>  <span itemprop="foo" itempropvalue="bar" itemscope>
>>>
>>>  or CSS-like one I've proposed later:
>>>
>>>  <span itemprop="foo: bar" itemscope>
>>>
>>>  then 'bar' is obviously value of this span as property.
>>
>> That doesn't seem obvious to me.
>
> What exactly is unobvious for you? (What exact of the two syntaxes, what exactly in each of them.)

In the former example, that @itempropvalue wins over @itemscope in
determining the value of the <span>.  There's no clear reason that one
should win over the other, so it will end up confusing people.

I'm ignoring the latter example for the time being.  It's somewhat
clearer, but it has its own problems, such as defining a second syntax
for @itemprop.  Remember, @itemprop currently takes a space-separated
list of properties.  Your suggestion would probably require *also*
defining a comma-separated syntax for your colon-separated pairs.  How
whitespace is treated before and after the value is unclear as well.
(CSS gets around this by making whitespace insignificant.  You can't
do that with Microdata.)

>>>  Then, microdata part of the spec probably should be simplified. In particular (but not limited to), it may make sense to disallow specifying 'itemscope' and 'itemprop' for the same element simultaneously (if it's currently really allowed).
>>
>> Do you understand what it means to have @itemprop and @itemscope on
>> the same element?
>
> Unfortunately, not quite. (If such their using is really needed and quite clear for you, then hopefully it would be not very hard for you to explain this briefly.)

A property's value may, itself, be another Microdata item.  For
example, the 'location' property of a 'review' item may be a 'geo'
item with 'lat' and 'long' properties.  That's indicated by putting
@itemscope on the element with the @itemprop.

> Anyway, if the spec is too hard to understand (and it _is_ as for specifying 'itemscope' and 'itemprop' for the same element), then it should be simplified, isn't it? ;-)

If it's difficult to understand what @itemprop and @itemscope do when
put together, some further examples or clarification could be added.
But the functionality is a necessity for many use-cases, and so can't
be removed.  On the other hand, specifying the Microdata value of a
property via an attribute isn't a necessary piece of functionality -
there are several ways to achieve the same functionality that have
less possibility of confusion.

~TJ

Received on Monday, 14 November 2011 17:34:03 UTC