对于距离类型的对象,属性 高度无法被 Google 识别
The property height is not recognized by Google for an object of type Distance
给定一件 18 x 24 英寸的视觉艺术作品:
<div itemscope="itemscope" itemtype="http://schema.org/VisualArtwork">
<span itemprop="height" itemscope="itemscope"
itemtype="http://schema.org/Distance">18 inches</span>
<span itemprop="width" itemscope="itemscope"
itemtype="http://schema.org/Distance">24 inches</span>
</div>
此标记因错误 Structured Data Testing Tool 而失败,"The property height is not recognized by Google for an object of type Distance." 同样适用于 width。
有趣的是,如果将 Schema.org 中第一个示例 VisualArtwork(关于 Magritte 绘画的示例)插入 SDTT,您会得到相同的错误。测试工具对此有误吗?
我建议使用[定量值]而不是[距离]。这是一个基本示例:
<div itemscope="itemscope" itemtype="http://schema.org/VisualArtwork">
<span itemprop="height" itemscope="itemscope" itemtype="http://schema.org/QuantitativeValue">
<span itemprop="value">18</span>
<span itemprop="unitCode" content="INH">inches</span>
</span>
<span itemprop="width" itemscope="itemscope" itemtype="http://schema.org/QuantitativeValue">
<span itemprop="value">24</span>
<span itemprop="unitCode" content="INH">inches</span>
</span>
</div>
中提供了一些关于此的额外信息
我会看看 schema.org 上的示例,并在必要时进行更正(我就是编写这些示例的人!)
保罗
给定一件 18 x 24 英寸的视觉艺术作品:
<div itemscope="itemscope" itemtype="http://schema.org/VisualArtwork">
<span itemprop="height" itemscope="itemscope"
itemtype="http://schema.org/Distance">18 inches</span>
<span itemprop="width" itemscope="itemscope"
itemtype="http://schema.org/Distance">24 inches</span>
</div>
此标记因错误 Structured Data Testing Tool 而失败,"The property height is not recognized by Google for an object of type Distance." 同样适用于 width。
有趣的是,如果将 Schema.org 中第一个示例 VisualArtwork(关于 Magritte 绘画的示例)插入 SDTT,您会得到相同的错误。测试工具对此有误吗?
我建议使用[定量值]而不是[距离]。这是一个基本示例:
<div itemscope="itemscope" itemtype="http://schema.org/VisualArtwork">
<span itemprop="height" itemscope="itemscope" itemtype="http://schema.org/QuantitativeValue">
<span itemprop="value">18</span>
<span itemprop="unitCode" content="INH">inches</span>
</span>
<span itemprop="width" itemscope="itemscope" itemtype="http://schema.org/QuantitativeValue">
<span itemprop="value">24</span>
<span itemprop="unitCode" content="INH">inches</span>
</span>
</div>
中提供了一些关于此的额外信息
我会看看 schema.org 上的示例,并在必要时进行更正(我就是编写这些示例的人!)
保罗