kg-construct / rml-core

RML-Core: Main features for RDF generation with RML
https://w3id.org/rml/core/spec
Creative Commons Attribution 4.0 International
12 stars 9 forks source link

fix shape based validation #92

Closed pmaria closed 7 months ago

pmaria commented 7 months ago

This change breaks the excessively long chain of sh:node statements in the shape leading to recursion issues in pyshacl. In essence most of the sh:node statements in the shapes could be removed, since this is also covered by sh:targetObjectsOf of the object shape.

So, if we have:

:x
 sh:path :y ;
 sh:node :z .

:z sh:targetObjectsOf :y .

we can omit :x sh:node :z.

I now only made a minimal change by removing one sh:node statement. But IMO we could remove all of them that match the above. @DylanVanAssche what is your opinion on this?

DylanVanAssche commented 7 months ago

If the removals are not punching holes in the coverage I'm all for it! Basically, we must be able to validate via 2 ways:

  1. Property paths
  2. RDF type classes
pmaria commented 7 months ago

Ok, then I will remove those sh:node statements that aren't necessary for this.