Hi Gary,
I have attached a (slightly) corrected version. Use sh:sparql
instead of sh:propertyValidator. And for the prefixes I have just
pointed at the dash namespace, which defines the correct things
for the common namespaces such as xsd - I couldn't see if your
declarations were correct as the example is a snippet only. Also I
have used ?value as return variable in the SELECT because then it
will be picked up by the validation report.
This may help https://www.topquadrant.com/technology/shacl/tutorial-sparql-constraints/ and of course the spec https://www.w3.org/TR/shacl/#sparql-constraints-example
HTH
Holger

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CADnyxpu7Fsf%3DN0vc%2BmWG2%2BnkiMD%3DHH5-uXwditHvF5zABGqYrA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/b2c75635-b510-59d3-f2af-4dfcb3ae9860%40topquadrant.com.
Well ... I was close! Thanks for the correction, I'll put that into play -- would the same structure also be true for sh:ask?
You cannot use sh:ask in SPARQL-based constraints. However, sh:ask is used by so-called SPARQL-based Constraint Components. Those are reusable extensions of SHACL Core that allow you to describe similar constraints using property values instead of writing SPARQL. See
https://www.w3.org/TR/shacl/#sparql-constraint-components
for examples of the syntax.
Thanks also for reminding me of the tutorial page, I should revisit that; I'm anxiously awaiting the first publication of "SHACL for Dummies" ;)
As a side question, what strategy do people use for documenting shacl rules? I've been using rdfs:comment, but I'm open to best-practice suggestions.
Yes, rdfs:comment is perfectly fine. sh:message is used for the
actual messages that will be produced in the validation report.
Holger
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CADnyxpv5VWfWGCdY%2Bt4gEtmba5i0itJVSmR4%3D92HvrhJ0fWB6g%40mail.gmail.com.