Fan Li, If :X rdf:type :A, :A rdfs:subClassOf :B, :Y :prop1 :X and you have a constraint :prop1 sh:class :B, you will NOT get a validation result.
For example, if you look at one of the samples available for EDG - Geo Taxonomy, you will not that most resources in that taxonomy are not of type skos:Concept. Instead, they are members of classes Continent, City, etc., which are declared as subclasses of skos:Concept. There is a constraint on skos:broader: skos:Concept-broader a sh:PropertyShape ; sh:path skos:broader ; sh:class skos:Concept ; sh:description "Relates a concept to a concept that is more general in meaning."@en ; sh:group skos:StandardRelationshipsPropertyGroup ; sh:name "broader concept" ; sh:order 0 ; . Data has, for example: g:United_States a g:Country ; skos:broader g:North_America. g:North_America a g:Continent. And there are no violations. SubclassOf entailment is always applied automatically when sh:class constraints are evaluated and when target nodes are calculated if class target is used. This is described in the spec: SHACL Type The SHACL types of an RDF term <https://www.w3.org/TR/shacl/#dfn-rdf-term> in an RDF graph <https://www.w3.org/TR/shacl/#dfn-rdf-graph> is the set of its values <https://www.w3.org/TR/shacl/#dfn-value> for rdf:type in the graph <https://www.w3.org/TR/shacl/#dfn-rdf-graph> as well as the SHACL superclasses <https://www.w3.org/TR/shacl/#dfn-shacl-superclass> of these values <https://www.w3.org/TR/shacl/#dfn-value> in the graph <https://www.w3.org/TR/shacl/#dfn-rdf-graph>. If you are having a problem, the issue is not with this logic. Are you certain that the rdfs:subClassOf statement is present in the data graph? How are you running the validation? Further, the book you are referencing has quite a number of inaccuracies in its description of SHACL - some are more subtle than others. I would not recommend it as a guide for understanding and using SHACL. If you do so, chances are you will have some key misconceptions that would prevent you from using SHACL effectively. Irene > On Oct 10, 2019, at 11:41 AM, Fan Li <[email protected]> wrote: > > Recently we encountered a situation where the validation error "Value must be > an instance of [some class]" is raised, even though the individual has been > declared an instance of a subclass of the class. We looked it up and it seems > the error is related to the lack of RDFS entailment in the validation > process: https://book.validatingrdf.com/bookHtml011.html#sec171 > > The referenced book also mentioned that entailment may be enabled during the > validation process. Is it possible within EDG? > > > -- > 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/f4ad53ab-2f70-402c-8d4d-4b906ac5d69e%40googlegroups.com. -- 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/5F85EE56-8A20-4AF0-8577-5F45FBFFDCFE%40topquadrant.com.
