How to embed items of a different data type? Schema.org explains it here: https://schema.org/docs/gs.html
I use Google’s markup helper (www.google.com/webmasters/markup-helper/) that creates automatically the code. I have this code simplified and I choose data type Article:
<div class="post"> <img src="1.png"> <h1>Title of the post</h1> <div> <p>This is the body of the post</p> </div> <p>Author of the post</p> </div><!-- end schema Article --> Google gives me this:
<div itemscope itemtype="http://schema.org/Article"> <img itemprop="image" src="1.png"> <h1 itemprop="headline name" >Title of the post</h1> <div itemprop="articleBody" > <p>This is the body of the post</p> </div> <span itemprop="author" itemscope itemtype="http://schema.org/Person"> <p itemprop="name">Author of the post</p> </span> </div><!-- end schema Article --> I am confused on the last span. I understand that author belongs to the data type Person and not Article. But why it introduces the itemprop="name" here? It seems redundant. For me, one of those options makes more sense:
<p itemprop="author" itemscope itemtype="http://schema.org/Person"> Author of the post </p> Or perhaps:
<span itemscope itemtype="http://schema.org/Person"> <p itemprop="author">Author of the post</p> </span> - Why Google’s markup helper gives itemprop="name", is it an error?
- Are my solutions ok?
- Can anyone explain in a simple way how to embed a different data type in Schema.org?
(Where I write "Author of the post" I mean any name, John Doe, for instance)
UPDATE:
Now I realize that Schema Article (Blog and BlogPosting too) do have the property Autor. In fact https://schema.org/Article Example 1 (bottom of the page) gives this:
<div itemscope itemtype="http://schema.org/Article"> <span itemprop="name">How to Tie a Reef Knot</span> by <span itemprop="author">John Doe</span> </div> So, I suppose that there is no need to embed author from Person. Google’s markup helper must have a software problem. Am I right?