例如,宣布我的页面是关于也是AutomotiveBusiness的LocalBusiness的标准化方法是什么?标准文件在哪里明确指明了这一点?
解决方法
itemtype
attribute,W3C Microdata规范(目前是工作草案)说:
The
itemtype
attribute,if specified,must have a value that is an unordered set of unique space-separated tokens that are case-sensitive,each of which is a valid absolute URL,and all of which are in the same vocabulary. The attribute’s value must have at least one token.
来自相同词汇表的多种类型
因此,如果它们都来自相同的词汇表(例如Schema.org),您可以在itemtype属性中指定多个项目类型:
<article itemscope itemtype="http://schema.org/HotelRoom http://schema.org/Offer"> <!-- an MTE (multi-typed entity) with the types 'HotelRoom' and 'Offer' --> </article>
在您的情况下,通常没有必要提供这两种类型,因为AutomotiveBusiness
继承自LocalBusiness
(即,每个AutomotiveBusiness也是LocalBusiness).
来自不同词汇表的多种类型
如果要提供来自多个词汇表的类型,可以使用Schema.org的additionalType
属性:
<article itemscope itemtype="http://schema.org/AutomotiveBusiness"> <link itemprop="additionalType" href="http://www.productontology.org/id/Automobile_repair_shop" /> <!-- an MTE (multi-typed entity) with the Schema.org type 'AutomotiveBusiness' an an additional PTO type 'Automobile_repair_shop' --> </article>
具有相同itemid值的多个项目
您还可以提供单独的项目(每个项目都有自己的项目范围),并为它们提供相同的itemid值,从而表明它们大致相同:
<div itemscope itemtype="http://schema.org/HotelRoom" itemid="/rooms/42#this"> </div> <div itemscope itemtype="http://schema.org/Offer" itemid="/rooms/42#this"> </div>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。