1

Given a visual art work that's 18 x 24 inches:

<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>

This markup fails the Structured Data Testing Tool with the error, "The property height is not recognized by Google for an object of type Distance." Same goes for width.

Interestingly enough, if you plug the first example from Schema.org for VisualArtwork (the one about the Magritte painting) into the SDTT you get the same errors. Is the Testing Tool mistaken about this?

4

1 回答 1

2

我建议使用 [Quantitative Value] 而不是 [Distance]。这是一个基本示例:

<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>

我已经在我的博客文章中提供了一些额外的信息,网址为http://www.lazaruscorporation.co.uk/blogs/arts-tech/posts/schema-dot-org-quantitative-value-accessibility-typography

我将查看 schema.org 上的示例并在必要时更正它们(我是编写这些示例的人!)

保罗

于 2015-11-17T05:48:54.357 回答