Question

I did not understand how to behave in the case there were multiple items of the same type, as for the writers of a movie. I have to repeat itemprop="author" for each writer or i can include them in a single 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>

or

<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>
Was it helpful?

Solution

The latter is right. The first snippet means that your person have two names (which is not so uncommon situation really). You can check it using Google or Yandex validators. They will give you smth like this

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

And you (I believe) need

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

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

Schema.org provides good example for this case at 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>

BTW there were a lot of discussions around cardinality of schema.org properties. If you're interested in details you can read corresponding materials: ISSUE at tracker and W3C Wiki page.

And I personally follow the rule stated by Guha:

Right now, it is always allowed to have multiple values.

OTHER TIPS

I think they are both correct. Imdb use frist syntax.

<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> 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top