2013-07-24 44 views
0

我不明白如何在具有多个相同类型的项目(如电影作者)的情况下表现如何。 我必须为每个作家重复itemprop =“author”,或者我可以将它们包含在一个div中?丰富片段 - 双重电影作者

<div itemprop="author" itemscope itemtype="http://schema.org/Person"> 
    <span itemprop="name"><a href="#">Cesare Frugoni</a></span> 
    <span itemprop="name"><a href="#">Enrico Vanzina</a></span> 
</div> 

<div itemprop="author" itemscope itemtype="http://schema.org/Person"> 
    <span itemprop="name"><a href="#">Enrico Vanzina</a></span> 
</div> 
<div itemprop="author" itemscope itemtype="http://schema.org/Person"> 
    <span itemprop="name"><a href="#">Cesare Frugoni</a></span> 
</div> 
+0

你能解释一下这是什么吗? (谷歌搜索?如果是这样,添加[标签:谷歌搜索]标签将使更多的标签追随者意识到不仅仅是[标签:丰富片段])。 –

+0

这只是一个语法问题..我添加了另一个标签... – WalterV

回答

2

后者是正确的。第一个片段意味着你的人有两个名字(这实际上并不罕见)。您可以使用GoogleYandex验证程序进行检查。他们会给你水木清华这样

person 
itemType = http://schema.org/Person 
name = Cesare Frugoni 
name = Enrico Vanzina 

你(我相信)需要

person 
itemType = http://schema.org/Person 
name = Enrico Vanzina 

person 
itemType = http://schema.org/Person 
name = Cesare Frugoni 

Schema.org这种情况在schema.org/Movie提供了很好的例子。

<div itemscope itemtype="http://schema.org/Movie"> 

<h1 itemprop="name">Pirates of the Carribean: On Stranger Tides (2011)</h1> 
<span itemprop="description">Jack Sparrow and Barbossa embark on a quest to 
find the elusive fountain of youth, only to discover that Blackbeard and 
his daughter are after it too.</span> 
Director: 
<div itemprop="director" itemscope itemtype="http://schema.org/Person"> 
<span itemprop="name">Rob Marshall</span> 
</div> 
Writers: 
<div itemprop="author" itemscope itemtype="http://schema.org/Person"> 
<span itemprop="name">Ted Elliott</span> 
</div> 
<div itemprop="author" itemscope itemtype="http://schema.org/Person"> 
<span itemprop="name">Terry Rossio</span> 
</div> 
, and 7 more credits 
Stars: 
<div itemprop="actor" itemscope itemtype="http://schema.org/Person"> 
<span itemprop="name">Johnny Depp</span>, 
</div> 
<div itemprop="actor" itemscope itemtype="http://schema.org/Person"> 
<span itemprop="name">Penelope Cruz</span>, 
</div> 
<div itemprop="actor" itemscope itemtype="http://schema.org/Person"> 
<span itemprop="name">Ian McShane</span> 
</div> 
</div> 

顺便说一句,围绕schema.org属性的基数讨论了很多。如果你对细节感兴趣,你可以阅读相应的材料:ISSUE跟踪器和W3C Wiki页面。

我个人遵循古哈说规则:

眼下,它总是允许有多个值。

0

我觉得他们都正确。 Imdb使用第一语法。

<div itemprop="creator" itemscope itemtype="http://schema.org/Person"> 
    <h4 class="inline">Writers:</h4> 
    <a href="#" itemprop='url'><span class="itemprop" itemprop="name">Cesare Frugoni</span></a> 
    <a href="#" itemprop='url'><span class="itemprop" itemprop="name">Steno</span></a> 
</div> 
相关问题