【问题标题】:The property height is not recognized by Google for an object of type DistanceGoogle 无法识别距离类型对象的属性高度
【发布时间】:2015-11-17 14:00:48
【问题描述】:

考虑到 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 失败并出现错误,“Google 无法识别 Distance 类型的对象的属性 height。” 宽度也是如此。

有趣的是,如果您将来自 Schema.org 的VisualArtwork 的第一个示例(关于马格利特绘画的示例)插入 SDTT,您会得到相同的错误。测试工具对此有误吗?

【问题讨论】:

    标签: html schema.org structured-data


    【解决方案1】:

    我建议使用 [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 上的示例并在必要时更正它们(我是编写这些示例的人!)

    保罗

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-12-01
      • 2020-09-16
      • 2021-03-28
      • 2018-12-09
      • 1970-01-01
      • 2013-07-17
      • 1970-01-01
      • 2021-04-01
      相关资源
      最近更新 更多