-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Property Shapes without paths #77
Comments
@tpluscode and @matthiaspalmer (who was poster of the original issue)
ex:minCount a sh:PropertyShape ;
sh:path ex:foo;
sh:minCount 1 |
@VladimirAlexiev my toughts per point below.
Don't think so, the range of
Yes, exactly, this is what I would like to achieve. i.e. a way of using and would allow you to "extend" property Shapes.
I do not see that this is new semantics, I think this is how
That would a shape expression that is not possible to satisfy, unless ex:foo is a subproperty of ex:age and you validate with entailment enabled. But "impossible shapes" is not unique to this situation. Just consider a shape with minCount 2 and maxCount 1. |
Thanks @matthiaspalmer, I never got a reply I was satisfied with but I like your argument about "impossible shapes". You can achieve unsatisfiable shapes in various ways.
I'd say that is exactly what
The >2 element rule applies to sequence paths. Maybe that's what you thought of @VladimirAlexiev
Alternatively to what @matthiaspalmer said, the path could be ignored and the constraints incorporated into the parent Property Shape? 🤔 |
If you want to reuse aspects of property shapes, I think the right way is to look into Constraint Components? |
@HolgerKnublauch, could you comment on this scenario being seeming supported by the TB implementation? |
The spec states that the behaviour of SHACL engines against malformed shapes graphs is undefined. So if my code does allow these incomplete property shapes without sh:path through then this is officially allowed. For SHACL 1.2 we could strengthen those cases though and say that a sh:PropertyShape without a sh:path should throw a failure and stop validation. |
Here's the evidence: https://www.w3.org/TR/shacl/#property-shapes
Property Shapes without |
Pleas consider this shape, as mentioned in issue zazuko/rdf-validate-shacl#140
It seems logical to be able to reuse parts of property shapes like this but this is invalid SHACL, because
ex:minCount
does not have ash:path
On the other hand TopBraid's SHACL implementation does support this construct as one would expect.
Should the definition of property shape be relaxed?
The text was updated successfully, but these errors were encountered: