Re: Itemscope validation

2013-08-19 4:21, Michael[tm] Smith wrote:

> "itemscope" and "itemprop" are attributes from Microdata, while "property"
> is from RDFa. There is no specification that defines what the validation
> requirements are when you mix Microdata attributes with RDFa attributes on
> the same element, and validator doesn't expect that you will, and doesn't
> support mixing Microdata and RDFa them on the same element.

If Microdata and RDFa are separate, shouldn’t validators treat them as 
separate? That is, accept each of them under its own rules.

There seems to be a conflict between HTML5 CR (Candidate Recommendation) 
and the HTML 5.1 Nightly (Editor's Draft that typically changes daily). 
HTML5 CR says about the meta element that "exactly one of the name, 
http-equiv, charset attributes must be specified". No mention of 
itemprop, so it will presumably be governed by the general rules for 
general attributes only. HTML 5.1 Nightly currently has itemprop, too, 
in the list, making <meta itemprop=... name=... ...> invalid at the moment.

That's a bit confusing, but what about <meta property=... itemprop=...>? 
Which rule forbids it?

> The solution is to not use "itemprop" and  property on the same element.

Well, <p itemprop=foo property=bar> seems to pass validation today.

Is this problem really specific to the meta element? Is the effective 
rule really "exactly one of the name, http-equiv, charset, itemprop, and 
property attributes must be specified"?

Does this mean that if you wish to present metadata both according to 
Microdata and according to RDFa, you need to duplicate meta tags? Instead of
  <meta property=foo itemprop=xxx content=bar>
you would write
  <meta property=foo content=bar>
  <meta itemprop=xxx content=bar>
This sounds odd, and I cannot find such a requirement in HTML 5.1 
Nightly. And I cannot see how a dual meta tag could cause harm.

Yucca

Received on Monday, 19 August 2013 08:35:29 UTC