Hi Julie,
I assume you want to instantiate sh:SPARQLRule https://w3c.github.io/shacl/shacl-af/#SPARQLRule
and link a class/shape with that rule using sh:rule. sh:sparql is used for constraints, not inference rules.
You can see an example of this in the datacube.shapes.ttl file:
qb:ComponentPropertyRuleShape
a sh:NodeShape ;
rdfs:comment "A SHACL rule that can be used to infer additional
triples that copies all values of the sub-properties of
qb:componentProperty into qb:componentProperty itself. This is
needed because many constraints here only reference
qb:componentProperty." ;
sh:rule [
a sh:SPARQLRule ;
sh:construct """CONSTRUCT {
?subject qb:componentProperty ?object .
}
WHERE {
?subject
qb:attribute|qb:dimension|qb:measure|qb:measureDimension ?object .
}""" ;
sh:order 0 ;
sh:prefixes <http://topbraid.org/datacube> ;
] ;
sh:targetNode sh:this ;
.
and many more in the file owl2shacl.ttl
One area where every newcomer seems to trip over is how to use
sh:prefixes. To get started and keep it simple you may want to
just place them as PREFIX declarations into each rule. Otherwise,
https://www.w3.org/TR/shacl/#sparql-prefixes
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/530d8d3e-0dec-40c0-bd01-ead87639f57fn%40googlegroups.com.