Confirming a slight disappointment

22 views
Skip to first unread message

Steve Ray

unread,
Mar 1, 2022, 1:47:58 PM3/1/22
to TopBraid Suite Users
I was trying to use sh:equals in a property shape as follows:

   sh:property [
       sh:path s223:hasDomain ;
       sh:class s223:Domain ;
       sh:maxCount 1 ;
       sh:minCount 1 ;
       sh:equals ( s223:isContainedIn s223:hasDomain ) ;
     ] ;

...and discovered to my disappointment that I cannot use a property path as the value of sh:equals. I do see that the SHACL spec says it must be an IRI, but it seems so natural to be able to validate using a property path here. Was there a reason it is limited to an IRI?

Steve


Holger Knublauch

unread,
Mar 1, 2022, 4:14:16 PM3/1/22
to topbrai...@googlegroups.com
Yes your observation is correct. In this case you can formulate it the other way around, with the expression as sh:path and hasDomain as sh:equals. Or, of course, use SPARQL directly.

But a SHACL 1.1 WG will almost certainly generalise this to allow paths in both places. (And it would rename the property to sh:equalProperty because many users misinterpret the name).

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/CAGUep85b3A-j%3DfjJSYNUpjbSsr9Ge4ffNO5DqcNuBJv4HBmn1Q%40mail.gmail.com.

Steve Ray

unread,
Mar 1, 2022, 8:54:07 PM3/1/22
to TopBraid Suite Users
Ah, very clever! I didn't think of using the sh:path side instead.

Steve




Reply all
Reply to author
Forward
0 new messages