Html 如何使用微数据标记电影列表?

Html 如何使用微数据标记电影列表?,html,microdata,schema.org,Html,Microdata,Schema.org,我试图用微数据向谷歌清楚地解释我们的小电影俱乐部。我反复研究schema.org,建立了我需要的三个主要类:电影、电影加热器和事件 然而,似乎我被要求设计代码的方式是违反直觉的 在我看来,一个地方(电影加热器)会举办一个他们将放映电影的活动似乎是合乎逻辑的 但这似乎是不可能的,因为没有办法把一部电影放在一个活动中 我能把这些东西列为一个整体的唯一方法是把电影放在最外面,包含在电影加热器上发生的事件。但是如果我想列出多部电影,我必须重复电影对象下的所有MOVIETHEATER数据,从而产生大量不必

我试图用微数据向谷歌清楚地解释我们的小电影俱乐部。我反复研究schema.org,建立了我需要的三个主要类:电影、电影加热器和事件

然而,似乎我被要求设计代码的方式是违反直觉的

在我看来,一个地方(电影加热器)会举办一个他们将放映电影的活动似乎是合乎逻辑的

但这似乎是不可能的,因为没有办法把一部电影放在一个活动中

我能把这些东西列为一个整体的唯一方法是把电影放在最外面,包含在电影加热器上发生的事件。但是如果我想列出多部电影,我必须重复电影对象下的所有MOVIETHEATER数据,从而产生大量不必要的HTML


那么,我是否读错了或遗漏了什么;或者这是唯一的方法吗?

看来你是对的。 使用itemref以避免复制电影加热器描述。比如说

In this example, a single license statement is applied to two works, using itemref from the items representing the works:

<!DOCTYPE HTML>
<html>
 <head>
  <title>Photo gallery</title>
 </head>
 <body>
  <h1>My photos</h1>
  <figure itemscope itemtype="http://n.whatwg.org/work" itemref="licenses">
   <img itemprop="work" src="images/house.jpeg" alt="A white house, boarded up, sits in a forest.">
   <figcaption itemprop="title">The house I found.</figcaption>
  </figure>
  <figure itemscope itemtype="http://n.whatwg.org/work" itemref="licenses">
   <img itemprop="work" src="images/mailbox.jpeg" alt="Outside the house is a mailbox. It has a leaflet inside.">
   <figcaption itemprop="title">The mailbox.</figcaption>
  </figure>
  <footer>
   <p id="licenses">All images licensed under the <a itemprop="license"
   href="http://www.opensource.org/licenses/mit-license.php">MIT
   license</a>.</p>
  </footer>
 </body>
</html>
在本例中,使用表示作品的项目中的itemref,将单个许可证声明应用于两个作品:
照片库
我的照片
我找到的房子。
邮箱。

根据许可证授权的所有图像


顺便说一句,你可以在

上写下关于schema.org的评论和建议。看来你是对的。 使用itemref以避免复制电影加热器描述。比如说

In this example, a single license statement is applied to two works, using itemref from the items representing the works:

<!DOCTYPE HTML>
<html>
 <head>
  <title>Photo gallery</title>
 </head>
 <body>
  <h1>My photos</h1>
  <figure itemscope itemtype="http://n.whatwg.org/work" itemref="licenses">
   <img itemprop="work" src="images/house.jpeg" alt="A white house, boarded up, sits in a forest.">
   <figcaption itemprop="title">The house I found.</figcaption>
  </figure>
  <figure itemscope itemtype="http://n.whatwg.org/work" itemref="licenses">
   <img itemprop="work" src="images/mailbox.jpeg" alt="Outside the house is a mailbox. It has a leaflet inside.">
   <figcaption itemprop="title">The mailbox.</figcaption>
  </figure>
  <footer>
   <p id="licenses">All images licensed under the <a itemprop="license"
   href="http://www.opensource.org/licenses/mit-license.php">MIT
   license</a>.</p>
  </footer>
 </body>
</html>
在本例中,使用表示作品的项目中的itemref,将单个许可证声明应用于两个作品:
照片库
我的照片
我找到的房子。
邮箱。

根据许可证授权的所有图像


顺便说一句,你可以在

上写下关于schema.org的评论和建议,谢谢。最近我偶然发现了一些提到itemref的其他问题和答案,但schema.org网站上根本没有关于itemref的内容。因为schema.org没有描述微数据标准,它描述了可以与微数据标准一起使用的元数据。检查规格谢谢。最近我偶然发现了一些提到itemref的其他问题和答案,但schema.org网站上根本没有关于itemref的内容。因为schema.org没有描述微数据标准,它描述了可以与微数据标准一起使用的元数据。检查规格