Re: Question about negation

Yes, but I can’t point you to a single place in the spec. It is throughout.

Value Nodes are defined here https://www.w3.org/TR/shacl/#value-nodes <https://www.w3.org/TR/shacl/#value-nodes>

Sh:not is defined here https://www.w3.org/TR/shacl/#NotConstraintComponent <https://www.w3.org/TR/shacl/#NotConstraintComponent>

> ex:p1 a ex:Person;
>  rdfs:label “”, [].

ex:p1 is a target for ex:Person shape.

It is invalid when validated against

>  [ sh:path rdfs:label ; sh:nodeKind sh:Literal ; ] .

This means that it is valid for

> ex:Person  a sh:NodeShape, owl:Class ; 
>  sh:not [ sh:path rdfs:label ; sh:nodeKind sh:Literal ; ] .


On the other hand,

> ex:Person  a sh:NodeShape, owl:Class ; 
>  sh:property [ sh:path rdfs:label ; sh:not [sh:nodeKind sh:Literal] ; ] .

Says that for a person such as ex:p1, values of their rdfs:label shouldn’t be literals. Otherwise, it is invalid.



> On May 7, 2019, at 3:44 PM, Håvard M. Ottestad <hmottestad@gmail.com> wrote:
> 
> Hi Irene,
> 
> I think I might be managing to grasp this, and I guess my assumptions up until now has been wrong.
> 
> ex:Person  a sh:NodeShape, owl:Class ; 
>  sh:not [ sh:path rdfs:label ; sh:nodeKind sh:Literal ; ] .
> 
> Is not equivalent to
> 
> ex:Person  a sh:NodeShape, owl:Class ; 
>  sh:property [ sh:path rdfs:label ; sh:not [sh:nodeKind sh:Literal] ; ] .
> 
> The following data is valid for the former but not the latter:
> 
> ex:p1 a ex:Person;
>  rdfs:label “”, [].
> 
> Is all this mentioned somewhere in the spec?
> 
> Håvard
> 
> On 7 May 2019, at 18:54, Irene Polikoff <irene@topquadrant.com <mailto:irene@topquadrant.com>> wrote:
> 
>> ex:Person  a sh:NodeShape, owl:Class ; 
>> sh:not [ sh:path rdfs:label ; sh:uniqueLanguage true ; ] .
>> 
>> The value node in this example is whatever is targeted by the node shape - a resource (person) that has labels, not the values of the labels.
>> 
>> 
>>> On May 7, 2019, at 12:28 PM, Håvard Ottestad <hmottestad@gmail.com <mailto:hmottestad@gmail.com>> wrote:
>>> 
>>> Hi Irene,
>>> 
>>> Thank you for chiming in. I took a look at the negation definition again:
>>> 
>>> sh:not specifies the condition that each value node <https://www.w3.org/TR/shacl/#dfn-value-nodes> cannot conform <https://www.w3.org/TR/shacl/#dfn-conforms> to a given shape <https://www.w3.org/TR/shacl/#dfn-shape>. This is comparable to negation and the logical "not" operator.
>>> 
>>> From this I feel that something like sh:not [ sh:path rdfs:label; sh:nodeKind sh:literal] is equivalent to [ sh:path rdfs:label; sh:nodeKind sh:IriOrBlankNode]. Because every value cannot conform to the given shape. 
>>> 
>>> So:
>>> 
>>> ex:thing rdfs:label “”, []. 
>>> 
>>> Would be invalid for both above rules. 
>>> 
>>> So this makes me think that uniqueLang should be implemented in the same way, eg. negations means that no value can be unique by its language tag, since regular uniqueLang means that all values are unique by their language. 
>>> 
>>> Håvard
>>> 
>>> On 7 May 2019, at 17:32, Irene Polikoff <irene@topquadrant.com <mailto:irene@topquadrant.com>> wrote:
>>> 
>>>> It means that resource will not be valid against [ sh:path rdfs:label; sh:uniqueLang true ].
>>>> 
>>>> 
>>>>> On May 7, 2019, at 2:56 AM, Håvard Ottestad <hmottestad@gmail.com <mailto:hmottestad@gmail.com>> wrote:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> I am working on implementing negation for the RDF4J ShaclSail. 
>>>>> 
>>>>> The combination uniqueLang and negation got me a little bit confused. 
>>>>> 
>>>>> sh:uniqueLang means that there can be no two different values for a target and path where both values have the same language tag. 
>>>>> 
>>>>> Does sh:not[ sh:path rdfs:label; sh:uniqueLang true ] mean:
>>>>> 
>>>>> - equivalent to sh:uniqueLang false (eg. ignored)?
>>>>> - for any value, there must be a different value with the same language tag?
>>>>> - or something else?
>>>>> 
>>>>> Cheers,
>>>>> Håvard
>>>> 
>> 

Received on Tuesday, 7 May 2019 20:26:28 UTC