Re: schema.org does not serve RDF?

On Thu, 15 Oct 2020 at 11:12, Dan Brickley <danbri@google.com> wrote:

> On Thu, 15 Oct 2020 at 09:00, Melvin Carvalho <melvincarvalho@gmail.com>
> wrote:
>
>> On Wed, 14 Oct 2020 at 23:48, Martynas Jusevičius <martynas@atomgraph.com>
>> wrote:
>>
>>> Hi,
>>>
>>> Our Linked Data client is failing to load term descriptions from
>>> schema.org because it looks like RDF representations are not served,
>>> or at least the content negotiation does not work and HTML is
>>> returned?
>>>
>>> Example:
>>> curl https://schema.org/employee -H "Accept:
>>>
>>> application/rdf+xml,application/n-triples,application/rdf+thrift,text/turtle,text/rdf+n3,application/rdf+json"
>>>
>>> Executable example: https://reqbin.com/c-vjs20ras
>>
>>
>> From my experience the content negotiation pattern that you are using is
>> quite hard to implement
>>
>> Another simpler option might be to just put it in JSON-LD in a script tag
>> ie a structured data island
>>
>> That might be the "schema.org" way of doing things ie eating your own
>> dogfood, and I think is part of the JSON-LD 1.1 spec, so would play well
>> with toolilng
>>
>
> We don't use content negotiation to serve up per-page fragments of the RDF
> representation of Schema.org. The site is statically served.
>
> You can get the whole thing from https://schema.org/docs/developers.html
> in a variety of downloadable formats. We have for some years included a few
> RDFa annotations in the HTML of each page, including
> https://schema.org/employee but will be migrating these to JSON-LD
> islands for maintainability, and for consistency with the ways schema.org
> markup itself is most widely used.
>
> The current HTML has: <div id="mainContent" vocab="http://schema.org/"
> typeof="rdfs:Property" resource="http://schema.org/employee">
>
> which seems to extract ok,
> https://www.w3.org/2012/pyRdfa/extract?uri=https%3A%2F%2Fschema.org%2Femployee&format=nt&rdfagraph=output&vocab_expansion=false&rdfa_lite=false&embedded_rdf=true&space_preserve=true&vocab_cache=true&vocab_cache_report=false&vocab_cache_refresh=false
>
> ...however this is fragile and makes it hard to improve the site's UI
> without breaking the RDFa. There's a draft of the next release at
> https://webschemas.org/employee which has embedded JSON-LD at the end of
> the page content.
>

{
"@context": {
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"schema": "http://schema.org/",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
"@id": "schema:employee",
"@type": "rdf:Property",
"rdfs:comment": "Someone working for this organization.",
"rdfs:label": "employee",
"schema:domainIncludes": {
"@id": "schema:Organization"
},
"schema:rangeIncludes": {
"@id": "schema:Person"
}
}

LOVE this!


>
> cheers,
>
> Dan
>
>
>
>>
>>
>
>>>
>>>
>>> Martynas
>>> atomgraph.com
>>>
>>>

Received on Thursday, 15 October 2020 09:23:44 UTC