Reuse of SHACL predicates for profiles #365
ashleysommer
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As per the docs page for building profiles, https://github.com/RDFLib/prez/blob/main/docs/development.md
the multiple property paths can be defined for a profile to use, by apply a value to
sh:paththat is ash:union.It is unclear whether the usage of these predicates in the profile is designed to mimic the use of SHACL Node Expressions (from the SHACL-AF spec), or the SHACL Path Expressions (from the SHACL base spec).
sh:pathis used in both features, butsh:unionis only used in Node Expressions. It seems to be a hybrid of both.The use of
sh:pathwithin the profile's top-levelsh:propertypredicate (and given the Profile itself is a NodeShape) it appears that profiles are following the pattern of SHACL Path expressions, however the use ofsh:unionis not allowed in Path expressions.The purpose of a profile is to define the paths that need to be queried from the graph, to place into the result subgraph. This is similar to the way Nodes are expressed in the context of Node Expressions. The use of union to join sets of nodes from different paths supports this. However, the use of paths within the
sh:unionlist is not specified correctly according to SH Node Expressions.If the intention is for the profile to say "Give me the set of nodes that is the result of these Node Expressions", it should look like this:
Otherwise, if the intention is to say "Give me a resulting data shape to corresponds to this property shape", it would look something like this:
However I don't know if
sh:alternativePathis actually correct in this case, because it implies the Node at the end of each of the paths would share a varname (eg, multiple paths to get a value for a single variable).Maybe if we think of the unnamed endpoint variable as
?oand each alternative property path is?p, and every alternate expresses?focus ?p ?othen that matches the behaviour of the currentsh:unionimplemenation in profiles anyway.Beta Was this translation helpful? Give feedback.
All reactions