Re: Question about the behavior of property shapes

On 9/25/2015 2:55, Solbrig, Harold R. wrote:
> Folks,
>
> I'm looking over the property constraints and trying to understand the 
> behavior if (a) there are not triples in the graph whose subject is 
> the supplied focus node or (b) there are no triples in the graph with 
> the propertyConstraint predicate.  I am not an expert in SPARQL, but 
> it would appear that:
> SELECT $this ($this AS ?subject) $predicate (?value AS ?object)
> WHERE {
> 	$this $predicate ?value .
> 	FILTER NOT EXISTS {
> 		GRAPH $shapesGraph {
> 			$allowedValues (rdf:rest*)/rdf:first ?value .
> 		}
> 	}
> }
> Would pass (not return any triples) in either case. Is this true, or 
> am I just misreading the SPARQL? If it is true, is this what is intended?

Yes your interpretation is correct and as intended. To enforce the 
presence of at least one value, sh:allowedValues needs to be combined 
with sh:minCount>0

Holger

Received on Thursday, 24 September 2015 23:13:00 UTC