-
Notifications
You must be signed in to change notification settings - Fork 132
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
Triples containing Variable result in invalid turtle #383
Comments
Working as intended (writer always expects valid input), but we can indeed accept a PR along the lines of #165 to perform optional input sanitization. |
Indeed relevant only if a feature like #339 (comment) is included. |
May I throw in one of my recent blog posts RDF/JS for Data Processing. Summary of the blog post: Validation is a spectrum, and what is valid RDF depends on the context. That's why I like a modular approach, and rdf-validation could be one building block. Nevertheless, if a media type is given, it's legit that a serializer validates that the output is according to the spec. But I would recommend using flags, as mentioned in #339, to control the behavior, and ideally there is no performance impact. |
With N3 it's easy to accidently transform valid RDF into invalid RDF if the output format supports a smaller part of RDF. Examples include variables (this issue), graphs (#339) and relative IRIs (not mentioned yet). I'd welcome a general flag to make sure a writer only emits valid data. |
A filter function for each output format to maps a Quad to a (possibly reduced) Quad or null would also help. For instance In any case the documentation should mention current behaviour here similar to the statement on parsing:
The current documentation is misleading:
yes.
This does not ensure strict compatibility like the Parser does. It's a design choice but reading the documentation one might assume strict writing as well. |
When creating a triple with
Variable
s in it, and then writing it astext/turtle
, the outcome is invalid turtle.This yields
which is invalid turtle.
Along the argumentation in #165, this could rather throw error or gracefully drop the triples containing
Variable
.The text was updated successfully, but these errors were encountered: