- From: Peter F. Patel-Schneider <pfpschneider@gmail.com>
- Date: Mon, 26 Sep 2016 22:38:52 -0700
- To: Holger Knublauch <holger@topquadrant.com>, public-rdf-shapes@w3.org
On 09/26/2016 09:52 PM, Holger Knublauch wrote:
>
>
> On 27/09/2016 4:36, Peter F. Patel-Schneider wrote:
>> What happens here?
>>
>> Shapes graph
>>
>> s:s1 rdf:type sh:Shape ;
>> sh:targetClass ex:foo ;
>> sh:shape s:s2 ;
>> sh:property s:s2 .
>>
>> s:s2 sh:predicate ex:p ;
>> sh:class ex:c .
>>
>> Is s:s2 a property constraint? Is it a focus node constraint?
>
> It's both, and an implementation would treat them as both, depending on the
> context. Can you point at a section of the spec where this would cause issues?
> I do remember that older versions of the spec had a problem with this
> ambiguity, but I can't find those sections anymore.
>
> Thanks,
> Holger
Yes. Anyone with knowledge of the spec should be able to also easily find
parts of the spec that cause problems here.
Here is one such place:
"Property constraints specify conditions that must be met with respect to
nodes that can be reached from the focus node either by directly following a
given property (specified using sh:predicate) or a given property path
(specified using sh:path)."
Consider the following modification of the above constraint:
s:s1 rdf:type sh:Shape ;
sh:targetClass ex:foo ;
sh:property [ sh:predicate ex:q ; sh:shape s:s2 ] ;
sh:property s:s2 .
s:s2 sh:predicate ex:p ;
sh:class ex:c .
The data graph
ex:i rdf:type ex:foo ;
ex:q [ rdf:type ex:c ; ex:p [ ] ] ;
ex:p [ rdf:type ex:c ] .
does not validate against this shape in two ways:
1/ it does not have type ex:c
2/ it has a ex:q/ex:p value that does not have type ex:c
This is the same problem as before.
Peter F. Patel-Schneider
Nuance Communications
Received on Tuesday, 27 September 2016 05:39:24 UTC