-
Notifications
You must be signed in to change notification settings - Fork 13
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
Using sh:and inside of property shapes sometimes fails #140
Comments
Thank you for reporting this with a minimal reproduction. I have seen that error on some occasions but I never investigated to pinpoint its cause. I do expect this to be a bug inherited from the original JS implementation. Same behavior is observed on https://shacl.org/playground/ . Interestingly, some other tools known to me also fail this case in various ways. At least in the web version available to experiment. |
FYI, I am able to work around the issue although for now the report is a little inaccurate but at least the validation result is as expected. That said, we are internally undecided whether we should support a use where the shape is essentially not conforming to the specification (Property Shapes require |
That is great news @tpluscode, thanks a lot! I have two questions:
For me it is ok to repeat the FYI, I did see an example in the specification where it was left out and I just copied the approach, the second example shapes graph in 4.6.3. But that is probably a typo based on the more formal definition in 2.3. |
I am trying to find a way to reuse property shapes by utilizing the sh:and. However, the validator breaks for certain constraint components. I wonder if this is a bug or maybe I am missunderstanding certain aspects of the SHACL specification.
Here is an example that illustrates the problem playground application:
Shapes Graph:
Data graph (default data in the playground, provided for completeness):
The problem:
Change the last line of the shapes graph with the
sh:and
and instead point toex:ps1
, there will be an error in the console stating:My question is why would the above construction work for a value range constraint component but not for a cardinality constraint component.
Note, I have not tested through which constraint components that works as the cardinality constraint components is one of the most important from an inheritance perspecitive. If this is a bug that should be corrected, I am happy to do a more complete test to facilitate any potential fixes. I am also aware that there might be ways to achieve the same thing by adding the sh:and on a node shape instead, but this is not an option due to other reasons that is out of scope to bring up here in any detail (using SHACL to formally express application profiles).
The text was updated successfully, but these errors were encountered: