Schema.org - 多次引用单个定义

Schema.org - Referencing single definition multiple times

我有一个包含多篇文章的页面,我希望每篇文章都将发布者描述为一个组织,但我想避免的是为每篇文章重新定义该组织。这可能吗?

itemref 属性似乎只在相反的方向起作用,指定父 > 子关系,而不是相反。

在这个例子中,我使用了 Schema.org 中的组织示例,我希望它能说明问题 - 你不能每次都重复这个标记,它会使页面膨胀。

<div itemscope itemtype="http://schema.org/Organization">
  <span itemprop="name">Google.org (GOOG)</span>
  Contact Details:
    <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
      Main address:
        <span itemprop="streetAddress">38 avenue de l'Opera</span>
        <span itemprop="postalCode">F-75002</span>
        <span itemprop="addressLocality">Paris, France</span>
      ,
    </div>
      Tel:<span itemprop="telephone">( 33 1) 42 68 53 00 </span>,
      Fax:<span itemprop="faxNumber">( 33 1) 42 68 53 01 </span>,
      E-mail: <span itemprop="email">secretariat(at)google.org</span>
  Members:
  - National Scientific Members in 100 countries and territories: Country1, Country2, ...
  - Scientific Union Members, 30 organizations listed in this Yearbook:
  List of Alumni:
  <span itemprop="alumni" itemscope itemtype="http://schema.org/Person">
    <span itemprop="name">Jack Dan</span>
  </span>,
  <span itemprop="alumni" itemscope itemtype="http://schema.org/Person">
    <span itemprop="name">John Smith</span>
  </span>
</div>

<div itemscope itemtype="http://schema.org/NewsArticle">
  <meta itemprop="url" content="{{canonical_url}}" />
  <link itemprop="mainEntityOfPage" href="{{canonical_url}}">
  <meta itemprop="genre" content="{{genre}}" />
  <meta itemprop="publisher" temtype="http://schema.org/Organization" content="{{???}}" />
  <meta itemprop="dateModified" content="{{updated_at}}" />
  <div class="item-content">
    <div class="item-header" itemprop="name headline">
      {{Headline}}
    </div>
    <div class="item-body">

      <p itemprop="articleBody">
        {{content goes here}}
      </p>

    </div>

    <div class="item-footer">
      <span itemprop="datePublished dateCreated">{{date}}</span> - <span itemprop="creator author copyrightHolder">{{byline}}</span>
    </div>
  </div>
</div>

我目前正在使用微数据,但如果 JSON 可以实现我的尝试,那么我会考虑切换。

如果您在同一页面上有一个 Organization 项目和多个 Article 项目,您可以使用 Microdata 的 itemref 属性提供 Organization 项目作为值publisher 属性:

<div itemprop="publisher" itemscope itemtype="http://schema.org/Organization" id="publisher-1">
</div>

<article itemscope itemtype="http://schema.org/Article" itemref="publisher-1">
</article>

<article itemscope itemtype="http://schema.org/Article" itemref="publisher-1">
</article>

<article itemscope itemtype="http://schema.org/Article" itemref="publisher-1">
</article>

如果使用它,您必须确保 div(对于 Organization 项)不是另一个具有 itemscope 的元素的子元素(否则它会作为 publisher 添加到此项目)。