-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move reference versions of the RDF and RDFS vocabulary to this repo #33
base: main
Are you sure you want to change the base?
Conversation
ns/rdf.ttl retrieved from https://www.w3.org/1999/02/22-rdf-syntax-ns ns/rdfs.ttl retrieved from https://www.w3.org/2000/01/rdf-schema
And which seems to be RDF/XML whatever is asked for. |
oh wow! I didn't notice that...
... and not very portable! Jena, Ruby RDF and RDFlib (python) all produce different triples from it!... |
Oh. The <rdf:Description about="http://www.w3.org/2000/01/rdf-schema-more"> I would love to see more of this vocabulary translation practice (or some version thereof; maybe even using |
The rdf-schema-more resource returns as the following RDF/XML: <rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">
<rdf:Description rdf:about="http://www.w3.org/2000/01/rdf-schema#">
<rdfs:seeAlso>
<rdf:Description rdf:about="http://www.w3.org/2000/01/combined-ns-translation.rdf.fr">
<dc:language>fr</dc:language>
</rdf:Description>
</rdfs:seeAlso>
<rdfs:comment xml:lang="en" rdf:parseType="literal">
<p xmlns="http://www.w3.org/1999/xhtml">
The <a href="http://www.w3.org/2000/01/rdf-schema#">http://www.w3.org/2000/01/rdf-schema#</a>
namespace contains the RDF Schema vocabulary as defined by
the <a href="http://www.w3.org/TR/rdf-schema">RDF Schema
Candidate Recommendation</a>
</p>
</rdfs:comment>
</rdf:Description>
<rdf:Description about="http://www.w3.org/2000/01/rdf-schema-more">
<rdfs:comment xml:lang="en" rdf:parseType="literal">
<p xmlns="http://www.w3.org/1999/xhtml">
<a href="http://www.w3.org/2000/01/rdf-schema-more">This document</a>
provides additional statements about the
<a href="http://www.w3.org/2000/01/rdf-schema#">RDF Schema namespace</a>.
<a href="http://www.w3.org/2000/01/rdf-schema#label">label</a> and
<a href="http://www.w3.org/2000/01/rdf-schema#comment">comment</a>
properties with values in other languages might be linked from here
by further rdfs:seeAlso properties.
</p>
</rdfs:comment>
</rdf:Description>
</rdf:RDF> I'd say it's way out of date, and can be omitted in the future. |
@pchampin I pushed initial version of generation other versions from Turtle. Please take a look. |
No Content-type.
I agree with @gkellogg - Better to not maintain it, at least for now. There seems no evidence of use (it's broken and it is possible to add later. |
# Convert Turtle -> RDF/XML | ||
/home/runner/bin/riot --syntax=turtle --output=rdfxml ns/${base}.ttl > ns/${base}.rdf | ||
# Convert Turtle -> JSON-LD | ||
/home/runner/bin/riot --syntax=turtle --output=jsonld ns/${base}.ttl > ns/${base}.jsonld |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be nice to use a context such as below to get more useful JSON-LD output:
{
"id": "@id",
"type": "@type",
"dc": "http://purl.org/dc/elements/1.1/",
"owl": "http://www.w3.org/2002/07/owl#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"title": {"@id": "dc:title"},
"description": {"@id": "dc:description"},
"date": {"@id": "dc:date", "@type": "xsd:date"},
"comment": {"@id": "rdfs:comment"},
"domain": {"@id": "rdfs:domain", "@type": "@id"},
"label": {"@id": "rdfs:label"},
"range": {"@id": "rdfs:range", "@type": "@id"},
"isDefinedBy": {"@id": "rdfs:isDefinedBy", "@type": "@vocab"},
"seeAlso": {"@id": "rdfs:seeAlso", "@type": "@id"},
"subClassOf": {"@id": "rdfs:subClassOf", "@type": "@id"},
"subPropertyOf": {"@id": "rdfs:subPropertyOf", "@type": "@id"},
"imports": {"@id": "owl:imports", "@type": "@id"},
"versionInfo": {"@id": "owl:versionInfo", "@type": "@id"}
}
See the JSON-LD Playground to see how this comes out. If there is another templating engine which can generate HTML using the JSON-LD as an input that can generate a human readable version of the vocabulary that would work better with the existing dependencies, then cool. Otherwise, there is the Ruby-based Haml engine used for the JSON-LD vocabulary generation.
This isn't how other namespace documents handle this, as the namespace is not the spec. Redirection for each vocabulary entry would be difficult, given that we use a hash ("#") to determine each resource, which is not available when redirecting. I think a simple generated HTML file, which can include its own references into the spec for each entry, is probably the way to go. Probably best to leave for a subsequent PR, though. |
Or get the Turtle and conneg sorted out, and leave the HTML to "maintenance mode". Just getting the namespace content into a managed form is good progress. |
Clients should keep the fragment identifier (in so many words) on a redirect (the identifier is of course not sent to the server). And AFAIK all web browsers do this. Example: http://www.w3.org/2004/02/skos/core#Concept (should redirect to https://www.w3.org/2009/08/skos-reference/skos.html and the brower should add back (It would be tricky to redirect both the |
The goal of this PR is to have a reference version of the RDF and RDFS vocabularies in this repository,
where future changes will be tracked,
and to reflect the final version on https://www.w3.org/ when we publish the recommendation.
As a start, this PR introduces
ns/rdf.ttl
: retrieved from https://www.w3.org/1999/02/22-rdf-syntax-ns (accept:text/turtle)ns/rdfs.ttl
: retrieved from https://www.w3.org/2000/01/rdf-schema (accept:text/turtle)Plan for this PR: