2013-07-24 40 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> 
相關問題