Re: integration of schema.org with RDFa

On Jan 20, 2014, at 4:59 AM, <gig.graham@ontomatica.com> <gig.graham@ontomatica.com> wrote:

> I am writing to verify that I am using schema.org correctly in an RDFa document.
> I also would like to verify that the document type - host language specification is correct for RDFa 1.1.
> Rather than splashing the document here, I've posted to pastebin.
> The URL is:
>     http://pastebin.com/v0Y2Cf3t
> I have validated the document with:
>     http://www.w3.org/2012/pyRdfa/Validator.html#distill_by_upload
> and:
>     http://validator.w3.org/
> but hope to learn the reaction by and advice from human experts.
> Thank you in advance for assistance.

Note that this isn't specific to the use of RDFa with schema.org, but would be true of any other RDF markup or microdata usage.

I think you confuse entity types with properties, for example in the second span element you have @property="schema:GovernmentOrganization madsrdf:Authority" with @content="National Institutes of Health". Looking at the generated Turtle, this would look something like the following:

dbr:National_Institutes_of_Health schema:GovernmentOrganization "National Institutes of Health"@en;
   madsrdf:Authority "National Institutes of Health"@en .

(Also, note that the @resource property is ignored, because of @content). You probably want something more like the following:

dbr:National_Institutes_of_Health a schema:GovernmentOrganization, madsrdf:Authority
  schema:name "National Institutes of Health"@en .

To keep things simpler, I'd stick to the tenents of RDFa Lite 1.1 [1], which avoids using @about. In this case, it's not clear to me how dbr:National_Institutes_of_Health and <http://www.nih.gov/> should be related. Perhaps with something like schema:url? If that was the case, you might want to do something like the following:

<span resource="dbr:National_Institutes_of_Health" typeof="schema:GovernmentOrganization madsrdf:Authority">
  <link property="schema:url" href="http://www.nih.gov/"/>
  <meta property="schema:name" content="National Institutes of Health"/>
  NIH
</span>

(Of course, there are a number of ways to represent this type of information).

Additionally, the first span has @about, @resource and @content but no @property. In any case, I'd encourage just using @resource along with @property. The third span is better, but you'll ignore @resource because you also have @content.

Also, note that recursive use of span (or any other element) creates a shared context for the subject resource; you're overriding this by using @about at each point, which makes the chained use of span useless.

There are similar areas later on.

In general, I would suggest you model your data using something like Turtle, and test the RDFa to verify that it generates an equivalent representation when distilled. You might also use a tool such as my own distiller [2] to turn Turtle into RDFa, to at least get one idea of how the RDFa could be represented.

Gregg

[1] http://www.w3.org/TR/rdfa-lite/
[2] http://rdf.greggkellogg.net/distiller

> /g
> 

Received on Monday, 20 January 2014 20:28:54 UTC