I'm a little confused how to model a writer-agent relationship using RDFa (Lite), schema.org and FOAF. I'm not even sure if I need FOAF.
Let's say I publish a book, me being the writer and represented by an agent. So we have two Persons, one is me and one is the agent. To clarify, my intention is to link the agent as a contact point for the writer, while at the same time indicating that the writer is me, the subject of the page:
<!-- the agent representing me -->
<div resource="/Writecorp/Michael Stern" vocab="http://schema.org/" typeof="Person">
<span property="name">Michael Stern</span>
<div property="memberOf">
<div typeof="Organization">
<span property="name">Writecorp Inc. agency</span>
</div>
</div>
</div>
<!-- the writer, me -->
<div rel="me" vocab="http://schema.org/" typeof="Person">
<link rel="agent" property="contactPoint" href="/Writecorp/Michael Stern" />
<span property="name">H. P. Lovecraft</span>
</div>
The <link>
solution I gleaned from https://stackoverflow.com/a/19389163/441662.
When I feed this to the RDFa 1.1 Distiller and Parser, it shows the following output:
@prefix ns1: <http://www.w3.org/ns/rdfa#> .
@prefix ns2: <http://schema.org/> .
<> ns2:me [ a ns2:Person;
ns2:contactPoint </Writecorp/Michael Stern>;
ns2:name "H. P. Lovecraft" ];
ns1:usesVocabulary ns2: .
</Writecorp/Michael Stern> a ns2:Person;
ns2:memberOf """
Writecorp Inc. agency
""";
ns2:name "Michael Stern" .
[] a ns2:Organization;
ns2:name "Writecorp Inc. agency" .
- Did it recognize
rel="me"
properly? It is showing ns1:me, but I can't find anything about it in the referred namespace vocabulary, schema.org. Should I use a FOAF prefix and then usefoaf:me
? I can't find many examples on that either. - How do I model the agent as a contactPoint relationship? According to schema.org and Google's testing tool, a
Person
is not allowed to be acontactPoint
.
Solution?
One solution proposed further down is to have an entity that is both a ContactPoint
and a Person
, but Google's validator doesn't seem to like it much.
Another possible solution is to have both agent and writer point to the same ContactPoint
resource (see https://stackoverflow.com/a/30055747/441662).
Concerning rel="me"
, that came from a microformats example and is not possible with schema.org (yet, as @unor states in his answer) or foaf.
/edit 7-5-2015: I raised a GitHub issue for this problem. I'll update this post when I learn more...