Hello, I'm trying to use shacl to validate the schema of my neo4j database and I have a node that has a label with a space in it. How do I specify the SHACL targetClass in this case?
Hi @john.dzak nice catch.
White spaces are in general not great in URIs that can make some RDF parsers choke.
In the n10s.*.import.* methods you have the option to accept any kind of syntax in a URI by setting the verifyUriSyntax param to false.
This option was not available for the n10s.validation.shacl.import.* methods so the quick answer is that with the current version of n10s you cannot do it.
Now the good news is that it was a relatively simple fix to add support for it and the changes are in now, which means that you can either build from source today or if you prefer, you can wait till next release that should be out in just a couple of weeks. Here's the syntax you will need to use:
CALL n10s.validation.shacl.import.inline('...path to your file...','Turtle', { verifyUriSyntax: false })
Hope this helps.
PS: Introducing 'irregular' URIs is straightforward with other serialisation formats like RDF/XML or N-Triples where URIs are clearly delimited. WIth Turtle you'll have to trick the parser. Check out the hack I used in the unit test for this case.
I'm curious to try out other serialisation formats like RDF/XML or N-Triples like you mentioned. Do you have any examples that I can use to validate my schema using those formats?