I’m trying to understand the reason behind the existence of two attributes instead of just making the element holding the ‘itemtype’ the one that wraps the scope for the item.
Is it valid to have ‘itemtype’ attribute on one element and ‘itemscope’ attribute in some other? like this:
<section itemtype="http://data-vocabulary.org/Person">
<div itemscope>
<span itemprop="name">Alonso Torres</span>
</div>
</section>
If this case is not valid then why the existence of the ‘itemscope’ attribute at all? Why the spec didn’t come up with the idea of making the element holding the ‘itemtype’ attribute to be the one which sets the scope. That would have make sense for me.
You’re right, the
itemscopeattribute seems redundant. Someone else pointed this out on the W3C’s HTML mailing list: http://lists.w3.org/Archives/Public/public-html-bugzilla/2011Jan/0517.htmlThe answer ( http://lists.w3.org/Archives/Public/public-html-bugzilla/2011Jan/0523.html ) was that:
In other words, it’s better for attributes to have a single clear definition than multiple implied definitions. Not sure I agree but that’s the official view.