- From: Håvard Ottestad <hmottestad@gmail.com>
- Date: Wed, 22 May 2019 12:51:13 +0200
- To: Simon Steyskal <simon.steyskal@wu.ac.at>
- Cc: Public Shacl W3C <public-shacl@w3.org>
Hi Simon, Thanks for clarifying this. So it is also not legal to use [sh:uniqueLang true ] inside sh:or, sh:and, etc. And same for [sh:minCount 1 ] and [sh:maxCount 1]. This makes more sense now. And it’ll simplify my SHACL engine :) Cheers, Håvard > On 22 May 2019, at 11:41, Simon Steyskal <simon.steyskal@wu.ac.at> wrote: > > Hi! > >> Could anyone share some insight into how this was meant to work? Maybe >> it was discussed while the SHACL standard was created? > > The issue with your example is that sh:not expects a well-formed shape which [sh:uniqueLang true] isn't. In fact, https://www.w3.org/TR/shacl/#UniqueLangConstraintComponent says: > .) A property shape has at most one value for sh:uniqueLang. > .) Node shapes cannot have any value for sh:uniqueLang. > > This works in https://shacl.org/playground/ > > ex:NotExampleShape > a sh:NodeShape ; > sh:targetClass ex:Person ; > sh:not [ > a sh:PropertyShape ; > sh:path ex:name ; > sh:uniqueLang true ; > ] . > > > ex:peter a ex:Person ; > ex:name "name"@en , "name2"@en . > > ex:peter2 a ex:Person ; > ex:name "name"@en . > > ex:peter3 a ex:Person ; > ex:name 1 . > > => > > [ > a sh:ValidationResult ; > sh:resultSeverity sh:Violation ; > sh:sourceConstraintComponent sh:NotConstraintComponent ; > sh:sourceShape ex:NotExampleShape ; > sh:focusNode ex:peter2 ; > sh:value ex:peter2 ; > sh:resultMessage "Value does have shape Blank node _:n1032" ; > ] . > [ > a sh:ValidationResult ; > sh:resultSeverity sh:Violation ; > sh:sourceConstraintComponent sh:NotConstraintComponent ; > sh:sourceShape ex:NotExampleShape ; > sh:focusNode ex:peter3 ; > sh:value ex:peter3 ; > sh:resultMessage "Value does have shape Blank node _:n1032" ; > ] . > > br simon > --- > DDipl.-Ing. Simon Steyskal > Institute for Information Business, WU Vienna > > www: http://www.steyskal.info/ twitter: @simonsteys > > Am 2019-05-22 10:39, schrieb Håvard Ottestad: >> Hi, >> I have some more questions about negation and uniqueLang. >> This is my SHACL: >> ex:PersonShape >> a sh:NodeShape ; >> sh:targetClass foaf:Person ; >> sh:property ex:PersonShapeProperty . >> ex:PersonShapeProperty >> sh:path foaf:name ; >> sh:not [sh:uniqueLang true ]. >> Essentially. Every person may not have names that are unique by their >> language tag. >> Here are three examples. >> —————— >> ex:peter a foaf:Person ; >> foaf:name "name"@en , "name2"@en . >> —————— >> ex:peter a foaf:Person ; >> foaf:name "name"@en . >> —————— >> ex:peter a foaf:Person ; >> foaf:name 1 . >> —————— >> I would argue that at the first dataset should be valid, the second >> should be invalid and the third is somewhat undefined. >> I have tested these examples against the TopBraid reference >> implementation, which doesn’t implement this functionality. It also >> doesn’t implement sh:not [sh:minCount 1 ] og sh:not [sh:maxCount 1 ]. >> Here is the kind of error message I get: >> SHACL Validation Failure: No suitable validator found for constraint >> Constraint UniqueLangConstraintComponent at >> be6038563d3eba1a2f570dfa212bc4bd >> Could anyone share some insight into how this was meant to work? Maybe >> it was discussed while the SHACL standard was created? >> Cheers, >> Håvard
Received on Wednesday, 22 May 2019 10:51:39 UTC