w3c / rdf-concepts

https://w3c.github.io/rdf-concepts/
Other
11 stars 4 forks source link

define list of RDF serialization formats #83

Open VladimirAlexiev opened 3 months ago

VladimirAlexiev commented 3 months ago

Try as I might, I cannot find a list of RDF serialization formats.

It would be good to have an official list of formats, with links to their respective specs. I don't know whether this belongs in RDF Concepts, but is there any better place?

https://graphdb.ontotext.com/documentation/10.5/rdf-formats.html lists the formats and MIME types supported by rdf4j. Here is a subset excluding RDF-Star formats and alternative MIME types:

Format Content-Type note
RDF XML application/rdf+xml
Turtle text/turtle
N-Triples application/n-triples
N-Quads application/n-quads
JSON-LD application/ld+json
RDF JSON application/rdf+json
N3 text/n3 Extension of Turtle, but typical repositories treat it as Turtle
TriX application/trix
TriG application/trig

A major omission is RDFa and Microdata.

csarven commented 3 months ago

https://www.w3.org/TR/rdf12-concepts/#dfn-concrete-rdf-syntax normatively lists some example concrete RDF syntaxes.

On a related note, there is also https://www.w3.org/ns/formats/ but that is not specifically about concrete RDF syntaxes.

That said, there could be a separate Living Document (or similar) that lists all concrete RDF syntaxes which can then be referenced from RDF-CONCEPTS (and elsewhere).

AFAIK, Microdata is not a classified as a "concrete RDF syntax" - although it could be transformed to a concrete RDF syntax, which is a separate step/matter, just as anything else that could potentially be transformed to RDF.

RDFa is a concrete RDF syntax.

N3 is a superset of RDF and Turtle, so, not sure if that qualifies as a concrete RDF syntax.

As for RDF syntaxes (that came up in the past) that do not have a (W3C) specification (that can be normatively referenced), they may not qualify as a concrete RDF syntax.

VladimirAlexiev commented 3 months ago

normatively lists some example concrete RDF syntaxes

Thanks! I missed this. But we still need a summary table, with MIME types

RDFa is a concrete RDF syntax.

Right, for reading. But I wonder if it's legit for writing? The server cannot divine some HTML out of thin air? So maybe we need some flags "reading/writing"?

csarven commented 3 months ago

.. the server can't divine any concrete RDF syntax out of thin air (irrespective to host language being involved or not). There is no need to introduce dimensions whatsovever focusing on reading or writing because that's orthogonal to what a concrete RDF syntax entails. And again, in the same way we don't introduce things like whether a concrete RDF syntax is humand- and machin-readable or not, and whether actual consumption of certain concrete RDF syntaxes actually require additional processing or requiring JavaScript or so forth to be actually usable by a human.

pfps commented 1 week ago

Shouldn't this list go in the primer, not in concepts?

VladimirAlexiev commented 4 days ago

@csarven

The server cannot divine some HTML out of thin air?

I mean this: for all formats not related to HTML, given an RDF dataset, it is clear how to serialize to that format. That's not the case about RDFa because it requires some HTML elements and text: how would the server divine them?