Should we include attaching SHACL (1.2) Rules to shapes?
If so, what does it mean given the difference in execution semantics?
Subsidiary question:
In practice, how often are constriants and AF-rules written on the same shape?
If they are, how are the rules being used, in practice, to influence the validation?
Sketch:
[] rdf:type sh:NodeShape ;
sh:rule
[ a srl:SHACLRule ;
srl:ruleSet "..."; ## SRL syntax
sh:prefixes ... ;
];
[] rdf:type sh:NodeShape ;
sh:rule
[ a srl:SHACLRule ;
srl:ruleSet [ ... RDF syntax ... ] ;
];
Ruleset execution has $this bound to the current node shape. This is available to rule body evaluation:
https://www.w3.org/TR/shacl12-rules/#eval-rule
let SEQ0: Solution sequence = { ("this", RDF Term of current NodeShape) }
Well-formedness changes to compensate for this.
(given the more restricted matching, substitution of $this by it's RDF term should also work)
A problem:
sh:rule (AF) has it's own execution model. We would have to either modify that (turn it off) or make attached rules "run once". The latter option seems pointless because it is then no more than a way to write a CONSTRUCT rule in another syntax.
Should we include attaching SHACL (1.2) Rules to shapes?
If so, what does it mean given the difference in execution semantics?
Subsidiary question:
In practice, how often are constriants and AF-rules written on the same shape?
If they are, how are the rules being used, in practice, to influence the validation?
Sketch:
[] rdf:type sh:NodeShape ; sh:rule [ a srl:SHACLRule ; srl:ruleSet "..."; ## SRL syntax sh:prefixes ... ; ];[] rdf:type sh:NodeShape ; sh:rule [ a srl:SHACLRule ; srl:ruleSet [ ... RDF syntax ... ] ; ];Ruleset execution has
$thisbound to the current node shape. This is available to rule body evaluation:https://www.w3.org/TR/shacl12-rules/#eval-rule
Well-formedness changes to compensate for this.
(given the more restricted matching, substitution of
$thisby it's RDF term should also work)A problem:
sh:rule(AF) has it's own execution model. We would have to either modify that (turn it off) or make attached rules "run once". The latter option seems pointless because it is then no more than a way to write aCONSTRUCTrule in another syntax.