-
Notifications
You must be signed in to change notification settings - Fork 9
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
Include the validation of templates in the SHACL shapes #79
Comments
SHACL can do regex, once the listed regex is tested and test cases are provided with valid and invalid templates, we can add it. |
Tasks required:
@DylanVanAssche could you take care of this? |
from spec. Anything missing? |
I don't think so, please proceed :-) |
Escaping is tricky, especially since we use the same escape character in reference formulations as Turtle. If we write in something else then Turtle, we only need to escape once, other 2x. In non-Turtle you can write However in 2 you might be confused if the |
Is escaping really that tricky? You just need to load the file into a graph and indicate the format, no? Only then do we need to test the regex. That said, implementers can rely on ill-founded assumptions, so the test cases should provide redundant ones for RDF/XML, N-Quads, and even JSON-LD. |
If you use tools, they take care of that. It is mostly tricky if you write mappings manually. This is purely a developer experience thing. Since Turtle and the template-syntax use the same escape character |
* test-cases: RMLTC0024*-CSV: add invalid template test cases Contributes to #79 * shapes: tests: add expected failures for invalid templates
I believe that checking the validity of templates should be included in the shapes. I'm not sure whether SPARQL's regular expressions allow for recursion, but it can be achieved by:
^[^\{\}]*(?:\{[^\{\}]+\}[^\{\}]*)*$
(balanced and not nested)This can be achieved for a SPARQL constraint component.
The text was updated successfully, but these errors were encountered: