Hi Michael,

yes, you are right that the official main goal of SHACL was validation. This was mainly for political reasons because graph validation is what the W3C WG was chartered to do. However TopBraid products and users have used SPIN rules in the past to define transformations between different classes of RDF data instances. So we used those use cases as input to the SHACL-AF spec, which includes the SHACL rules, and became a separate (optional) deliverable of the SHACL WG. These rules are more general than SPIN because SHACL's target mechanism is more flexible than the class-centric design of SPIN. For rule-based transformations, the shapes and their target declarations would identify the focus nodes that the rules apply to.

The TopBraid SHACL API does support the execution of rules including a command line tool. Our SHACL JavaScript implementation and its Playground was primarily a demonstrator and not meant for serious work.

On your question, where do you see the link between validation and inferencing/transformation rules? Validation is technically not a requirement for rules, except in places like sh:condition in triple rules.

FWIW we try to use property value rules (sh:values) instead of triple rules due to the more natural and compact syntax, see https://w3c.github.io/shacl/shacl-af/#PropertyValueRule

Holger


On 15/02/2020 10:17, Michael Puckett wrote:
Hi, I'm new and I have an idea for SHACL that might go beyond its intended purpose but could potentially be very powerful.

I am interested in the fact that SHACL Rules can modify the data graph.

It might be possible to use Rules as an XSLT-like transformation engine for RDF/JSON-LD.

I would like to take data from one graph and process it with SHACL Rules and retrieve the transformed graph.

I have an example gist here:

https://gist.github.com/michaelcpuckett/35bf9773df25e3639e55ae15299ae63e

The JS Playground doesn't look like it supports Rules, because the above fails validation. (I haven't tried the Java implementation yet, I'm interested to see if it would validate there. I might have a syntax error.)

Of course, as I understand it, if it did validate, there would be no Validation Report.

I would like to suggest that in a future version of SHACL, a Validation Report, including the inferred data graph, could be provided with an explicit flag. The inferred data graph would be the result of transformation.

Perhaps this been considered already, or this is already possible? I would appreciate any feedback (or ideas for extension mechanisms if this goes beyond core).

Thanks!
Michael
--
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 [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/35675d95-f3d2-452c-ada2-093bdf3752bf%40googlegroups.com <https://groups.google.com/d/msgid/topbraid-users/35675d95-f3d2-452c-ada2-093bdf3752bf%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/9679f265-69e4-6919-b087-0be5a08f0a6a%40topquadrant.com.

Reply via email to