假设我有这个有效的微数据增强 HTML 片段:
<div itemscope itemtype="http://schema.org/Corporation">
<div itemprop="legalName">Example</div>
</div>
(我已经用谷歌的结构化数据测试工具对此进行了测试。)
现在我想添加一个在 schema.org 中不可用但在不同词汇中可用的属性(在这种情况下,W3C 注册了 Org Vocab [1]):
<div itemscope itemtype="http://schema.org/Corporation">
<div itemprop="legalName">Example</div>
<div itemprop="http://www.w3.org/ns/regorg#registration">XXX</div>
</div>
至少谷歌声称:
Error: Page contains property "http://www.w3.org/ns/regorg#registration" which is not part of the schema.
我可以删除itemtype
但我不想要这个,因为它会失去保真度 [2] 没有其他方法可以做到这一点吗?使用 RDFa 这将没有问题。
编辑
我发现 [3] 建议复制内容,但这显然不是一个好的解决方案。
[1] http://www.w3.org/TR/vocab-regorg/#ref_rov_registration
[3] http://www.w3.org/wiki/Mixing_HTML_Data_Formats#Mixing_Vocabularies_using_Repeated_Content