w3c / rdf-star

RDF-star specification
https://w3c.github.io/rdf-star/
Other
119 stars 23 forks source link

Filename extension for Turtle* files and for SPARQL* files #55

Closed hartig closed 3 years ago

hartig commented 3 years ago

I propose to use the file name extension ttls for Turtle files and, for SPARQL files, either rqs or rsq.

TODOs in this context:

gatemezing commented 3 years ago

+1 to have ttls exension for Turtle and rqs for SPARQL files

afs commented 3 years ago

This should be driven by the MIME type.

We should consider using the existing MIME type and file extensions "ttl" unless we have good reason to incur the costs of multiple MIME type file extensions for what is basically the same data.

Existing, non-<<>> Turtle file are valid and I believe will remain the most common case.

Do we expect returning Content-type: text/turtle-star on the off-chance it might contain <<>>? That breaks existing clients on data they could process.

If we have two MIME types, an old style client might send:

    Accept: text/turtle, */*;q=0.5

(prefer Turtle, otherwise send something)

Does the server scan all the data before deciding whether to respond Content-type: text/turtle or Content-type: text/turtle-star? That means no streaming and scale limitations. The file case - whether to write to a file called data.ttl or data.ttls - is similarly painful.

Toolkits are likely to default to application/rdf+xml for unknown content-type. Sending text/turtle-star as a unknown MIME type breaks things.

The responsibility for "scan" to check can be placed in the client because TTL* is a syntax error on parsing. Not ideal but at least then data that is existing Turtle continues to work.

A bad outcome would be that files start getting "ttls" on the off-chance it might contain <<>> to be safe.

For SPARQL*, there is an additional factor. There isn't a MIME type or file extension when used with GET ?query=

I am against expecting new query endpoints alongside existing ones just to handle SPARQL*

HolgerKnublauch commented 3 years ago

An approach with using long URIs has a natural serialization in vanilla TTL. Such RDF* files can still be handled by clients that know only that. TTLS however is a distinct format, and requires a distinct file ending because existing TTL parsers cannot handle it.

pchampin commented 3 years ago

I think we should defer this discussion until the "syntactic sugar" question is resolved #37 . I think the fact that RDF* could or could not be conveyed in standard Turtle will have a strong impact on the final decision here.

afs commented 3 years ago

See #43.

pchampin commented 3 years ago

Closing as a duplicate of #26