Opaque
Opaque

Reputation: 11

Cross-reference schema.org ‘Person’ data

I have a page mentioning several people. Most of them are connected to eachother in some way. For the purpose of this question lets say I have 3 people: John Doe, Jane Doe, and their child Baby Doe:

<div itemscope itemtype="http://schema.org/Person" id="john">
    <span itemprop="name">John Doe</span>
</div>
<div itemscope itemtype="http://schema.org/Person" id="jane">
    <span itemprop="name">Jane Doe</span>
</div>
<div itemscope itemtype="http://schema.org/Person" id="baby">
    <span itemprop="name">Baby Doe</span>
</div>

This parses without any problems (using Live Microdata).

Now I would like to cross-reference these people with eachother. Jane is John’s wife. So I will need a spouse property to match. Of course the opposite is true also: John is Jane’s husband.

Baby has both John and Jane as its parents. Ergo both John and Jane should have baby as their child.

How do I set this up? Whatever I have tried with itemref has been unsuccessful.

For instance, I can make Baby the child of both John and Jane but Baby will no longer be its own entity on the page: (see parse)

<div itemscope itemtype="http://schema.org/Person" id="john" itemref="baby">
    <span itemprop="name">John Doe</span>
</div>
<div itemscope itemtype="http://schema.org/Person" id="jane" itemref="baby">
    <span itemprop="name">Jane Doe</span>
</div>
<div itemprop="children" itemscope itemtype="http://schema.org/Person" id="baby">
    <span itemprop="name">Baby Doe</span>
</div>

Is there anyway for me to keep all persons as seperate entities and still cross-reference them as eachothers spouses, siblings, parents, children, etc? There is no one central person on the page to use as main itemscope.

Upvotes: 1

Views: 277

Answers (1)

ajax
ajax

Reputation: 1906

If I got you right you can't do this with schema.org. What you're talking about is "relationships" (e.g. "marriage" in Freebase). But schema.org doesn't provide this kind of abstraction.

Upvotes: 1

Related Questions