-
Notifications
You must be signed in to change notification settings - Fork 32
Description
https://raw.githack.com/w3c/data-shapes/master/shacl12-core/index.html#example-52 :
ex:PersonShape
a sh:NodeShape ;
sh:targetClass ex:Person ;
sh:property [ # _:b1
sh:path ex:address ;
sh:minCount 1 ;
sh:nodeByExpression ex:AddressShape ;
] .
This is not a good example because instead of sh:nodeByExpression
, we can use a plain sh:node
(as in https://raw.githack.com/w3c/data-shapes/master/shacl12-core/index.html#example-48).
@mgberg @afs @HolgerKnublauch
Can we come up with a better example?
I see in one of the commits of #408
Only using an IRI Expression here because Core doesn't define interesting node expressions
So I guess you want to keep Core self-contained and not use expressions except the trivial ones in https://raw.githack.com/w3c/data-shapes/master/shacl12-core/index.html#node-expressions. I think there are 2 better alternatives:
- That example could use a more complex expression, refer to the Node Expressions spec, and mention that supporting such expressions by Core-conforming engines is not required
- Or I could argue that
sh:nodeByExpression
itself should not be part of Core but of Node Expressions.- @mgberg can you confirm that the evaluation result of
sh:node
andsh:nodeByExpression
on IRIs/literals is the same?
- @mgberg can you confirm that the evaluation result of
Now I think that 2 is the better option: If an engine doesn't support non-trivial Node Expressions, why should it support sh:nodeByExpression
?