Is there a way to mark Item properties placed inside a child element (and therefore outside it)?
I use microdata and schema.org to tag some web pages. and I have a code like this:
<body itemscope itemtype="http://schema.org/WebPage"> <header itemscope itemtype="http://schema.org/WPHeader"> <a href="index.html"> <img id="logo" src="xxx" alt="xxx" itemprop="primaryImageOfPage"> </a> </header> </body>
I have a logo inside a WPHeader element and I want it to be primaryImageOfPage for the WebPage element. I know that I can use Itemref to include properties that are not in the item scope, but like this, you are not taking this property from the scope of child items. This is really a problem if both elements can have the same property, such as a name or description.
This is just an example of an explanation of the problem. By the time I solve it with itemref ... but there should be a better way to do this.
I know that there is no need to mark up everything, I just want to know that this is the best way to avoid this problem.
source share