rorlic commented on issue #3147: URL: https://github.com/apache/jena/issues/3147#issuecomment-2827198321
My bad, in order for the shacl tool to find the target nodes, you need to define the ontology (base class, property and derived class) in the DATA file and not in the SHAPES file, otherwise the `sh:SPARQLTarget` does not find the target nodes because the SPARQL query does not find the `?c rdfs:subClassOf ex:BaseClass` triple and the query returns no results. This is clearly stated in the [SHACL specification - Data Graph](https://www.w3.org/TR/shacl/#data-graph): > The data graph is expected to include all the ontology axioms related to the data and especially all the `rdfs:subClassOf` triples in order for SHACL to correctly identify class targets and validate Core SHACL constraints. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
