Skip to content
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

Serialise rdf/ttl with '@prefix' #132

Closed
oschihin opened this issue Mar 20, 2020 · 2 comments
Closed

Serialise rdf/ttl with '@prefix' #132

oschihin opened this issue Mar 20, 2020 · 2 comments

Comments

@oschihin
Copy link

Rather smallish issue, nonetheless ... I have trouble running generated rml-maps in processors (namely SDM-RDFizer) because of the usage of the PREFIX directive. Would be helpful to have a @prefix directive for IRI namespaces, with a trailing dot .. All I see is, you're aligned with SPARQL, but the recomendation is to go with the "older" turtle-spec (https://www.w3.org/TR/turtle/#sec-iri).

@mchlrch
Copy link
Member

mchlrch commented Mar 28, 2020

Thank you for your feedback. Yes, currently we generate the SPARQLish way of PREFIX.

We will consider your proposal to generate @prefix instead, for better backwards compatibility with older turtle parsers.

As a workaround, you could run the generated turtle file thru rapper to have the prefix directives converted. http://librdf.org/raptor/INSTALL.html

$ rapper -i turtle -o turtle -O-  -q airport-mapping.rml.ttl
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix ex: <https://schema.example.org/> .
@prefix schema: <https://schema.org/> .
@prefix transit: <http://vocab.org/transit/terms/> .
@prefix wgs84_pos: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
...

@oschihin
Copy link
Author

Hi. Thanks for the hint to rapper, I didnt know that and did a bit of sed.

@mchlrch mchlrch transferred this issue from zazuko/expressive-rdf-mapper Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants