- From: Holger Knublauch <holger@topquadrant.com>
- Date: Thu, 13 Oct 2016 15:41:59 +1000
- To: public-rdf-shapes@w3.org
I have added a note to https://www.w3.org/2014/data-shapes/track/issues/170 to link to this email thread. ISSUE-170 seems to cover the same topic and will be handled by the WG in due course. Holger On 13/10/2016 13:04, Peter F. Patel-Schneider wrote: > Because of the problems with EXISTS in SPARQL many ASK-defined constraint > components have unusual meanings according to their SPARQL definition. > > For example, the data graph > > ex:i1 rdf:type ex:C , D ; > ex:p _:b1 . > > validates against the shapes graph > > s:s1 rdf:type sh:Shape ; > sh:targetClass ex:C ; > sh:property [ sh:predicate ex:p ; > sh:class ex:D ] . > > This is probably not intended behaviour. > > > Note that this is separate from the continuing problems with pre-binding. > > > > SPARQL definition for sh:class > > ASK { > $value rdf:type/rdfs:subClassOf* $class . > } > > Resultant query > > SELECT DISTINCT $this ?value > WHERE { > $this $PATH ?value . > FILTER NOT EXISTS { $value rdf:type/rdfs:subClassOf* $class . } > } > > > When validating ex:i1 the first BGP should (if pre-binding were fixed) > result in a single mapping > { (this, ex:i1), (value, _:b1) } > EXISTS substitution then results in > BGP(_:b1 rdf:type/rdfs:subClassOf* $class . ) > which produces (again if pre-binding were fixed) a single mapping that maps > _:b1 to ex:i1 > so the FILTER is false. > > So the SELECT returns an empty result and so the data graph validates > against the shapes graph.f > > > Peter F. Patel-Schneider > Nuance Communications >
Received on Thursday, 13 October 2016 05:42:30 UTC