-
Notifications
You must be signed in to change notification settings - Fork 64
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
SHACL Advanced Feature sh:SPARQLRule --> sh:construct #235
Comments
Hi @HendrikBorgelt Please see my detailed reply in #189 (comment) for more detail, and a potential work around to achieve your goal. |
Hi @ashleysommer and thank you for your fast reply, as I don't want to send to many comments and start a large discussion, I decided to responded here instead of issue #60. If you prefer that I respond in an other issue I will do so. While I can understand your reply and also the intent that pyshacl follows primarily shacl core rules, I think that the advanced features allow for modification of copied data graph and should thus have the possibility of returning the modified graph. At least access to the modified data graph should be provided in some way as thus the user does not have the possibility of validating the correctness of the modified data graph.
as seen in SHACL Advanced Features - 8.4 General Execution Instructions for SHACL Rules I also want to point out the statement "However, in cases where the original data should not be modified,..." where it is implied that a direct modification of the data graph would be feasible with the SHACL-SPARQL advanced features. I would like to hear your thoughts on this. thanks in advance. |
I'm not against the use of the SHACL-Advanced Specification. Actually PySHACL was the first non-TopQuadrant SHACL validator to implement the SHACL Advanced Spec, and is still the only fully open-source SHACL validator that has support for all features of the SHACL Advanced Spec. The situation however is that PySHACL is a SHACL validator. It operates in accordance with the SHACL Specification and the SHACL Advanced Spec, for the role of validating a target datagraph against given shapes and constraints. PySHACL supports the use of SHACLRules (SPARQLRules and JSRules) on an internal working-copy of the datagraph, for purposes of enhancing the validation of the datagraph. A SHACL Validator outputs a ValidationReport, and strictly does not modify the source datagraph. There is an argument to be made about introducing alternate "ways-of-working" for PySHACL, so that it can operate outside the role of simply a SHACL Validator. Eg, as a stand-alone SHACL Rules engine, or a graph-expander using SHACL Rules. That is a separate conversations, if you want to contribute that conversation, go to #60.
Please read again the conversation in #189, specifically this comment, that shows a workaround (using in-place validation mode) to achieve that. |
Hello All,
I am currently trying to find a tool that has basically all SHACL-Advanced Features implemented because I want to set up a repo with SHACL-based inferencing Shapes and thus I stumbled over pyshacl, which looks very promising. Great work so far.
However, due to my niche application, I require a SHACL tool that not only can validate SHACL queries but also applies SPARQL based rules on the dataset. I Thus tested whether pyshacl is capable of validating/inferencing SPARQL-Rules based on the sh:construct feature.
While pyshacl does not give back errors for construct based SHACL-SPARQL queries, I can not see or save the results in a feasible manner.
I am currently testing with these shapes:
and this datagraph
both are based on the technical report of SHACL Advanced Features
and should infer
As there is currently neither a text occurring in the Validation Report nor an export function of the inferred graph (at least not that I found that option), I would appreciate it if you could help me.
P.S.: I use
pyshacl SHACL_AF_data_example.ttl -s SHACL_AF_example.ttl --advanced -i owlrl -o test_shacl3.tt
as the pythn command to perform the validation.The text was updated successfully, but these errors were encountered: