你有三个选择。
itemid
作为described by @Dharmang。你给Person 一个URI(带有itemid 属性)并在每个Book 中使用author 属性引用这个URI。
<div itemscope itemtype="http://schema.org/Person" itemid="#person-1">
</div>
<div itemscope itemtype="http://schema.org/Book">
<link itemprop="author" href="#person-1" />
</div>
<div itemscope itemtype="http://schema.org/Book">
<link itemprop="author" href="#person-1" />
</div>
(然后,其他人也可以使用此 URI 来谈论这个人,或者想识别那个人。所以[your-domain]/[your-path]#person-1 是一个代表实际人的 URI,而不仅仅是关于那个人的页面. 如果该人已经有这样的 URI,您可能希望重用它而不是创建自己的。)
问题:消费者支持可能不是最好的(但 Google 的测试工具似乎可以识别)。
itemref
您必须将itemprop="author" 添加到Person 项目,并使用itemref 属性从每个Book 引用其id。您不必为此添加meta 元素,只需在带有itemscope 的元素上添加即可。
<div itemprop="author" itemscope itemtype="http://schema.org/Person" id="author">
</div>
<div itemscope itemtype="http://schema.org/Book" itemref="author">
</div>
<div itemscope itemtype="http://schema.org/Book" itemref="author">
</div>
问题:Person 项不能有一个带有itemscope 的父项(因为它的author 属性将被添加到它)。因此,这意味着,例如,您不能使用mainEntity 属性来表示Person 是WebPage 的主要主题。
itemprop-reverse
如果您可以将Book 项嵌套在Person 项中,则可以使用itemprop-reverse 属性,它允许您在另一个方向使用属性:
<div itemscope itemtype="http://schema.org/Person">
<div itemprop-reverse="author" itemscope itemtype="http://schema.org/Book">
</div>
<div itemprop-reverse="author" itemscope itemtype="http://schema.org/Book">
</div>
</div>
(如果你不能嵌套,你仍然可以将它与 URI 值一起使用,但在这种情况下使用 itemid 可能是更好的选择。)
问题:此属性不是微数据规范的一部分。这是defined in W3C’s Microdata to RDF Note。所以消费者的支持可能不是那么好。 Google 的测试工具似乎无法识别它。