You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by "Alani, Yasir" <Y....@tees.ac.uk> on 2022/01/26 16:38:38 UTC

FW: Validation issue


From: Alani, Yasir
Sent: 26 January 2022 14:07
To: Andy Seaborne <an...@apache.org>
Subject: Validation issue

Hi, I have a shape that doesn’t seem to work with Jena (always conforms) but works when I try it on SHACL Playground.

The shape:
@prefix rdf:   http://www.w3.org/1999/02/22-rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns> .
@prefix sh:    http://www.w3.org/ns/shacl#<http://www.w3.org/ns/shacl> .
@prefix xsd:   http://www.w3.org/2001/XMLSchema#<http://www.w3.org/2001/XMLSchema> .
@prefix rdfs:  http://www.w3.org/2000/01/rdf-schema#<http://www.w3.org/2000/01/rdf-schema> .
@prefix ex:    http://www.example.org/#<http://www.example.org/> .
@prefix owl:   http://www.w3.org/2002/07/owl#<http://www.w3.org/2002/07/owl> .
@prefix yas:   http://www.semanticweb.org/yas#<http://www.semanticweb.org/yas> .

yas:CarShape a sh:NodeShape ;
               sh:targetClass yas:Car ;
sh:property [ sh:path yas:hasComponent ; sh:qualifiedValueShape [ sh:targetClass yas:Wheel ; sh:property [ sh:path (yas:hasDiameter yas:hasValue) ; sh:minInclusive 0 ; sh:maxInclusive 200 ; sh:datatype xsd:float ; ] ; ] ; sh:qualifiedMinCount 1 ] .

The data:
@prefix rdf:   http://www.w3.org/1999/02/22-rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns> .
@prefix sh:    http://www.w3.org/ns/shacl#<http://www.w3.org/ns/shacl> .
@prefix xsd:   http://www.w3.org/2001/XMLSchema#<http://www.w3.org/2001/XMLSchema> .
@prefix rdfs:  http://www.w3.org/2000/01/rdf-schema#<http://www.w3.org/2000/01/rdf-schema> .
@prefix ex:    http://www.example.org/#<http://www.example.org/> .
@prefix owl:   http://www.w3.org/2002/07/owl#<http://www.w3.org/2002/07/owl> .
@prefix yas:   http://www.semanticweb.org/yas#<http://www.semanticweb.org/yas> .

yas:Car_1 rdf:type owl:NamedIndividual ,
                           yas:Car ;
                  yas:hasComponent yas:Wheel_1 .

yas:Wheel_1 rdf:type owl:NamedIndividual ,
                            yas:Wheel ;
                   yas:hasDiameter yas:Diameter2 .

yas:Diameter2 rdf:type owl:NamedIndividual ,
                     yas:Diameter ;
            yas:hasValue "600"^^xsd:float .


I am using ShaclValidator method ==> validate<https://jena.apache.org/documentation/javadoc/shacl/org.apache.jena.shacl/org/apache/jena/shacl/ShaclValidator.html#validate(org.apache.jena.shacl.Shapes,org.apache.jena.graph.Graph,org.apache.jena.graph.Node)>​(Shapes<https://jena.apache.org/documentation/javadoc/shacl/org.apache.jena.shacl/org/apache/jena/shacl/Shapes.html> shapes, Graph<https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/graph/Graph.html?is-external=true> data, Node<https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/graph/Node.html?is-external=true> node).

Please advise if you can.
Regards
Yasir



Re: FW: Validation issue

Posted by Andy Seaborne <an...@apache.org>.

On 28/01/2022 13:46, Alani, Yasir wrote:
> Thank you very much Andy,
> 
> My thinking was that if the target node's conformance depends on other nodes its connected to, then surely it wouldn't conform if they didn't conform, from a logical point of view.

So you are looking for two validation errors?

When validating the whole graph there are violation on

sh:focusNode  yas:Wheel_1 ;

and

sh:focusNode  yas:Car_1 ;

because there are two targets, not because there is a nesting of targets.

Nesting targets does not add to validation of a specific node. (see the 
SHACL spec for the violation algorithm).  Only target nodes are reported.

If you want a subset of the data, validate all the relevant targets, or 
validate the whole graph and look in the validation report (which is 
RDF), or write specific shapes that do what you want.

Partial validation isn't formally defined.

> Is it possible at all to suggest maybe adding a third overloaded property that explicitly ignores the sh:qualifiedValueShape declarations? It could be called validateIgnoreQSD or something. Is this the right place to make such a suggestion?

Wouldn't that be changing the validation algorithm in the spec?

We already have a language for describing validation in SHACL itself.
You could write the form a shape that you want - you can modularize 
using owl:imports and sh:node.

	Andy

> 
> I am very grateful for your help.
> 
> Yasir
> 
> -----Original Message-----
> From: Andy Seaborne <an...@apache.org>
> Sent: 28 January 2022 12:50
> To: users@jena.apache.org
> Subject: Re: FW: Validation issue
> 
> 
> 
> On 28/01/2022 12:27, Alani, Yasir wrote:
>> Hi Andy,
>>
>> Have you had a chance to look at the difference between the overloaded "validate" methods of "ShaclValidator", in terms of qualified value shapes.
> 
> See message of 2021-01-27.
> 
> Jena gets one validation error - this is correct. If you call it with one target node, you only get the validation errors for that target node.
> 
> That's what the command line is doing as well.
> 
> shacl v -data data.ttl -shapes shapes.ttl \
>       -target 'https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23Car_1&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7Ce99b6735cd8f49ff95d408d9e25cc48d%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C0%7C637789710327457359%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=7hUBlo67S3OdnRruQoffjLbvMnibYrCUzKSoMO2J9ms%3D&amp;reserved=0'
> 
> 
> NB: You need to call it with "https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23Car_1&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7Ce99b6735cd8f49ff95d408d9e25cc48d%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C0%7C637789710327457359%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=7hUBlo67S3OdnRruQoffjLbvMnibYrCUzKSoMO2J9ms%3D&amp;reserved=0"
> not "yas:Car_1".
> 
> public static void main(String... args) throws IOException {
>     String DIR = ....
>     Graph data = RDFDataMgr.loadGraph(DIR+"/data.ttl");
>     Graph shapes = RDFDataMgr.loadGraph(DIR+"/shapes.ttl");
>     Node target = NodeFactory.createURI
>         ("https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23Car_1&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7Ce99b6735cd8f49ff95d408d9e25cc48d%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C0%7C637789710327457359%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=7hUBlo67S3OdnRruQoffjLbvMnibYrCUzKSoMO2J9ms%3D&amp;reserved=0");
>     ValidationReport report = ShaclValidator.get()
> 	.validate(shapes, data, target);
>     RDFDataMgr.write(System.out, report.getGraph(), Lang.TTL); }
> 
>       Andy
> 
> 
>>
>> Apologies if I bothered you with this.
>>
>> Yasir
>>
>>
>>
>> -----Original Message-----
>> From: Andy Seaborne <an...@apache.org>
>> Sent: 27 January 2022 08:40
>> To: users@jena.apache.org
>> Subject: Re: FW: Validation issue
>>
>> On 26/01/2022 22:49, Alani, Yasir wrote:
>>> *The node to be validated is "yas:Car_1"
>>>
>>> Thanks again
>>>
>>> -----Original Message-----
>>> From: Alani, Yasir <Y....@tees.ac.uk>
>>> Sent: 26 January 2022 22:38
>>> To: users@jena.apache.org
>>> Subject: RE: FW: Validation issue
>>>
>>> Hi Andy,
>>>
>>> Thank you for responding.
>>>
>>> What I meant by "work" is producing the correct/expected result, which is the 2 violations you received. The issue only seems to happen when I try to validate a node using the method "validate(Shapes shapes, Graph data, Node node)". The node in this case is "aso:Car_1". This method doesn't seem to 'like' qualified value shapes, as it returns 0 violations.
>>
>> I get one violation when calling:
>>
>> shacl v -data data.ttl -shapes shapes.ttl \
>>        -target 'https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23Wheel_1&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7Ce99b6735cd8f49ff95d408d9e25cc48d%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C0%7C637789710327457359%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=F2DIUl56XkYMdHLopIGwoHEcBEmE%2BmrGY%2FIMngO%2Fn3U%3D&amp;reserved=0'
>>
>> There are two target nodes. yas:Wheel_1 and yas:Car_1
>>
>> "Per node"  is "find which shapes have the node as a target node and call that shape".
>>
>> If the specified node isn't in the targets of the data+shapes, you get zero violations.
>>
>>        Andy
>>
>>>
>>> However, when I validate the entire data graph using method "validate(Shapes shapes, Graph data)" I do get 2 violations. Are these methods designed to work this way?
>>>
>>> I was using Jena 4.1.0 and even when I updated to Jena 4.3.2, I still get the same results.
>>>
>>> I used the old (TQ) shacl playground, which returned 2 violations as well.
>>>
>>> Many thanks
>>>
>>> Yasir
>>>
>>> -----Original Message-----
>>> From: Andy Seaborne <an...@apache.org>
>>> Sent: 26 January 2022 20:41
>>> To: users@jena.apache.org
>>> Subject: Re: FW: Validation issue
>>>
>>> Yasir,
>>>
>>> What is "work" here?
>>>
>>> I get 2 violations with Jena 4.3.2 - the same as (current latest) TQ
>>> shacl. (1 violation on a quite old, pre 4.x.x version of Jena - which
>>> version are you running?)
>>>
>>> Which SHACL playground did you use (there are two).
>>>
>>> The old (TopQuadrant) SHACL playground returns 2 violations.
>>> The Zazuko one returns 2 violations.
>>
>>>
>>> [ rdf:type     sh:ValidationReport ;
>>>       sh:conforms  false ;
>>>       sh:result    [
>>>           rdf:type                      sh:ValidationResult ;
>>>           sh:focusNode                  yas:Wheel_1 ;
>>>           sh:resultMessage
>>>      "Data value \"600\"^^xsd:float is not less than or equal to 200" ;
>>>           sh:resultPath                 ( yas:hasDiameter yas:hasValue ) ;
>>>           sh:resultSeverity             sh:Violation ;
>>>           sh:sourceConstraintComponent  sh:MaxInclusiveConstraintComponent ;
>>>           sh:sourceShape                []  ;
>>>           sh:value                      "600"^^xsd:float
>>>       ] ;
>>>       sh:result    [
>>>           rdf:type                      sh:ValidationResult ;
>>>           sh:focusNode                  yas:Car_1 ;
>>>           sh:resultMessage
>>> "QualifiedValueShape[1,_,false]: Min = 1 but got 0 validations" ;
>>>           sh:resultPath                 yas:hasComponent ;
>>>           sh:resultSeverity             sh:Violation ;
>>>           sh:sourceConstraintComponent
>>>              sh:QualifiedMinCountConstraintComponent ;
>>>           sh:sourceShape                []
>>>       ]
>>> ] .
>>>
>>>         Andy
>>>

RE: FW: Validation issue

Posted by "Alani, Yasir" <Y....@tees.ac.uk>.
Thank you very much Andy,

My thinking was that if the target node's conformance depends on other nodes its connected to, then surely it wouldn't conform if they didn't conform, from a logical point of view.

Is it possible at all to suggest maybe adding a third overloaded property that explicitly ignores the sh:qualifiedValueShape declarations? It could be called validateIgnoreQSD or something. Is this the right place to make such a suggestion?

I am very grateful for your help.

Yasir

-----Original Message-----
From: Andy Seaborne <an...@apache.org> 
Sent: 28 January 2022 12:50
To: users@jena.apache.org
Subject: Re: FW: Validation issue



On 28/01/2022 12:27, Alani, Yasir wrote:
> Hi Andy,
> 
> Have you had a chance to look at the difference between the overloaded "validate" methods of "ShaclValidator", in terms of qualified value shapes.

See message of 2021-01-27.

Jena gets one validation error - this is correct. If you call it with one target node, you only get the validation errors for that target node.

That's what the command line is doing as well.

shacl v -data data.ttl -shapes shapes.ttl \
     -target 'https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23Car_1&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7Ce99b6735cd8f49ff95d408d9e25cc48d%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C0%7C637789710327457359%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=7hUBlo67S3OdnRruQoffjLbvMnibYrCUzKSoMO2J9ms%3D&amp;reserved=0'


NB: You need to call it with "https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23Car_1&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7Ce99b6735cd8f49ff95d408d9e25cc48d%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C0%7C637789710327457359%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=7hUBlo67S3OdnRruQoffjLbvMnibYrCUzKSoMO2J9ms%3D&amp;reserved=0"
not "yas:Car_1".

public static void main(String... args) throws IOException {
   String DIR = ....
   Graph data = RDFDataMgr.loadGraph(DIR+"/data.ttl");
   Graph shapes = RDFDataMgr.loadGraph(DIR+"/shapes.ttl");
   Node target = NodeFactory.createURI
       ("https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23Car_1&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7Ce99b6735cd8f49ff95d408d9e25cc48d%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C0%7C637789710327457359%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=7hUBlo67S3OdnRruQoffjLbvMnibYrCUzKSoMO2J9ms%3D&amp;reserved=0");
   ValidationReport report = ShaclValidator.get()
	.validate(shapes, data, target);
   RDFDataMgr.write(System.out, report.getGraph(), Lang.TTL); }

     Andy


> 
> Apologies if I bothered you with this.
> 
> Yasir
> 
> 
> 
> -----Original Message-----
> From: Andy Seaborne <an...@apache.org>
> Sent: 27 January 2022 08:40
> To: users@jena.apache.org
> Subject: Re: FW: Validation issue
> 
> On 26/01/2022 22:49, Alani, Yasir wrote:
>> *The node to be validated is "yas:Car_1"
>>
>> Thanks again
>>
>> -----Original Message-----
>> From: Alani, Yasir <Y....@tees.ac.uk>
>> Sent: 26 January 2022 22:38
>> To: users@jena.apache.org
>> Subject: RE: FW: Validation issue
>>
>> Hi Andy,
>>
>> Thank you for responding.
>>
>> What I meant by "work" is producing the correct/expected result, which is the 2 violations you received. The issue only seems to happen when I try to validate a node using the method "validate(Shapes shapes, Graph data, Node node)". The node in this case is "aso:Car_1". This method doesn't seem to 'like' qualified value shapes, as it returns 0 violations.
> 
> I get one violation when calling:
> 
> shacl v -data data.ttl -shapes shapes.ttl \
>       -target 'https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23Wheel_1&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7Ce99b6735cd8f49ff95d408d9e25cc48d%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C0%7C637789710327457359%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=F2DIUl56XkYMdHLopIGwoHEcBEmE%2BmrGY%2FIMngO%2Fn3U%3D&amp;reserved=0'
> 
> There are two target nodes. yas:Wheel_1 and yas:Car_1
> 
> "Per node"  is "find which shapes have the node as a target node and call that shape".
> 
> If the specified node isn't in the targets of the data+shapes, you get zero violations.
> 
>       Andy
> 
>>
>> However, when I validate the entire data graph using method "validate(Shapes shapes, Graph data)" I do get 2 violations. Are these methods designed to work this way?
>>
>> I was using Jena 4.1.0 and even when I updated to Jena 4.3.2, I still get the same results.
>>
>> I used the old (TQ) shacl playground, which returned 2 violations as well.
>>
>> Many thanks
>>
>> Yasir
>>
>> -----Original Message-----
>> From: Andy Seaborne <an...@apache.org>
>> Sent: 26 January 2022 20:41
>> To: users@jena.apache.org
>> Subject: Re: FW: Validation issue
>>
>> Yasir,
>>
>> What is "work" here?
>>
>> I get 2 violations with Jena 4.3.2 - the same as (current latest) TQ 
>> shacl. (1 violation on a quite old, pre 4.x.x version of Jena - which 
>> version are you running?)
>>
>> Which SHACL playground did you use (there are two).
>>
>> The old (TopQuadrant) SHACL playground returns 2 violations.
>> The Zazuko one returns 2 violations.
> 
>>
>> [ rdf:type     sh:ValidationReport ;
>>      sh:conforms  false ;
>>      sh:result    [
>>          rdf:type                      sh:ValidationResult ;
>>          sh:focusNode                  yas:Wheel_1 ;
>>          sh:resultMessage
>>     "Data value \"600\"^^xsd:float is not less than or equal to 200" ;
>>          sh:resultPath                 ( yas:hasDiameter yas:hasValue ) ;
>>          sh:resultSeverity             sh:Violation ;
>>          sh:sourceConstraintComponent  sh:MaxInclusiveConstraintComponent ;
>>          sh:sourceShape                []  ;
>>          sh:value                      "600"^^xsd:float
>>      ] ;
>>      sh:result    [
>>          rdf:type                      sh:ValidationResult ;
>>          sh:focusNode                  yas:Car_1 ;
>>          sh:resultMessage
>> "QualifiedValueShape[1,_,false]: Min = 1 but got 0 validations" ;
>>          sh:resultPath                 yas:hasComponent ;
>>          sh:resultSeverity             sh:Violation ;
>>          sh:sourceConstraintComponent
>>             sh:QualifiedMinCountConstraintComponent ;
>>          sh:sourceShape                []
>>      ]
>> ] .
>>
>>        Andy
>>

Re: FW: Validation issue

Posted by Andy Seaborne <an...@apache.org>.

On 28/01/2022 12:27, Alani, Yasir wrote:
> Hi Andy,
> 
> Have you had a chance to look at the difference between the overloaded "validate" methods of "ShaclValidator", in terms of qualified value shapes.

See message of 2021-01-27.

Jena gets one validation error - this is correct. If you call it with 
one target node, you only get the validation errors for that target node.

That's what the command line is doing as well.

shacl v -data data.ttl -shapes shapes.ttl \
     -target 'http://www.semanticweb.org/yas#Car_1'


NB: You need to call it with "http://www.semanticweb.org/yas#Car_1"
not "yas:Car_1".

public static void main(String... args) throws IOException {
   String DIR = ....
   Graph data = RDFDataMgr.loadGraph(DIR+"/data.ttl");
   Graph shapes = RDFDataMgr.loadGraph(DIR+"/shapes.ttl");
   Node target = NodeFactory.createURI
       ("http://www.semanticweb.org/yas#Car_1");
   ValidationReport report = ShaclValidator.get()
	.validate(shapes, data, target);
   RDFDataMgr.write(System.out, report.getGraph(), Lang.TTL);
}

     Andy


> 
> Apologies if I bothered you with this.
> 
> Yasir
> 
> 
> 
> -----Original Message-----
> From: Andy Seaborne <an...@apache.org>
> Sent: 27 January 2022 08:40
> To: users@jena.apache.org
> Subject: Re: FW: Validation issue
> 
> On 26/01/2022 22:49, Alani, Yasir wrote:
>> *The node to be validated is "yas:Car_1"
>>
>> Thanks again
>>
>> -----Original Message-----
>> From: Alani, Yasir <Y....@tees.ac.uk>
>> Sent: 26 January 2022 22:38
>> To: users@jena.apache.org
>> Subject: RE: FW: Validation issue
>>
>> Hi Andy,
>>
>> Thank you for responding.
>>
>> What I meant by "work" is producing the correct/expected result, which is the 2 violations you received. The issue only seems to happen when I try to validate a node using the method "validate(Shapes shapes, Graph data, Node node)". The node in this case is "aso:Car_1". This method doesn't seem to 'like' qualified value shapes, as it returns 0 violations.
> 
> I get one violation when calling:
> 
> shacl v -data data.ttl -shapes shapes.ttl \
>       -target 'https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23Wheel_1&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7Ce6691c8465804ae8f02708d9e170a7e8%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C0%7C637788696243499932%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=TY3YRMvJpeBcPAMkQKbtRMIUCAK%2BOE24Cr%2BPezQ9Ziw%3D&amp;reserved=0'
> 
> There are two target nodes. yas:Wheel_1 and yas:Car_1
> 
> "Per node"  is "find which shapes have the node as a target node and call that shape".
> 
> If the specified node isn't in the targets of the data+shapes, you get zero violations.
> 
>       Andy
> 
>>
>> However, when I validate the entire data graph using method "validate(Shapes shapes, Graph data)" I do get 2 violations. Are these methods designed to work this way?
>>
>> I was using Jena 4.1.0 and even when I updated to Jena 4.3.2, I still get the same results.
>>
>> I used the old (TQ) shacl playground, which returned 2 violations as well.
>>
>> Many thanks
>>
>> Yasir
>>
>> -----Original Message-----
>> From: Andy Seaborne <an...@apache.org>
>> Sent: 26 January 2022 20:41
>> To: users@jena.apache.org
>> Subject: Re: FW: Validation issue
>>
>> Yasir,
>>
>> What is "work" here?
>>
>> I get 2 violations with Jena 4.3.2 - the same as (current latest) TQ
>> shacl. (1 violation on a quite old, pre 4.x.x version of Jena - which
>> version are you running?)
>>
>> Which SHACL playground did you use (there are two).
>>
>> The old (TopQuadrant) SHACL playground returns 2 violations.
>> The Zazuko one returns 2 violations.
> 
>>
>> [ rdf:type     sh:ValidationReport ;
>>      sh:conforms  false ;
>>      sh:result    [
>>          rdf:type                      sh:ValidationResult ;
>>          sh:focusNode                  yas:Wheel_1 ;
>>          sh:resultMessage
>>     "Data value \"600\"^^xsd:float is not less than or equal to 200" ;
>>          sh:resultPath                 ( yas:hasDiameter yas:hasValue ) ;
>>          sh:resultSeverity             sh:Violation ;
>>          sh:sourceConstraintComponent  sh:MaxInclusiveConstraintComponent ;
>>          sh:sourceShape                []  ;
>>          sh:value                      "600"^^xsd:float
>>      ] ;
>>      sh:result    [
>>          rdf:type                      sh:ValidationResult ;
>>          sh:focusNode                  yas:Car_1 ;
>>          sh:resultMessage
>> "QualifiedValueShape[1,_,false]: Min = 1 but got 0 validations" ;
>>          sh:resultPath                 yas:hasComponent ;
>>          sh:resultSeverity             sh:Violation ;
>>          sh:sourceConstraintComponent
>>             sh:QualifiedMinCountConstraintComponent ;
>>          sh:sourceShape                []
>>      ]
>> ] .
>>
>>        Andy
>>

RE: FW: Validation issue

Posted by "Alani, Yasir" <Y....@tees.ac.uk>.
Hi Andy,

Have you had a chance to look at the difference between the overloaded "validate" methods of "ShaclValidator", in terms of qualified value shapes.

Apologies if I bothered you with this.

Yasir



-----Original Message-----
From: Andy Seaborne <an...@apache.org> 
Sent: 27 January 2022 08:40
To: users@jena.apache.org
Subject: Re: FW: Validation issue

On 26/01/2022 22:49, Alani, Yasir wrote:
> *The node to be validated is "yas:Car_1"
> 
> Thanks again
> 
> -----Original Message-----
> From: Alani, Yasir <Y....@tees.ac.uk>
> Sent: 26 January 2022 22:38
> To: users@jena.apache.org
> Subject: RE: FW: Validation issue
> 
> Hi Andy,
> 
> Thank you for responding.
> 
> What I meant by "work" is producing the correct/expected result, which is the 2 violations you received. The issue only seems to happen when I try to validate a node using the method "validate(Shapes shapes, Graph data, Node node)". The node in this case is "aso:Car_1". This method doesn't seem to 'like' qualified value shapes, as it returns 0 violations.

I get one violation when calling:

shacl v -data data.ttl -shapes shapes.ttl \
     -target 'https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23Wheel_1&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7Ce6691c8465804ae8f02708d9e170a7e8%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C0%7C637788696243499932%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=TY3YRMvJpeBcPAMkQKbtRMIUCAK%2BOE24Cr%2BPezQ9Ziw%3D&amp;reserved=0'

There are two target nodes. yas:Wheel_1 and yas:Car_1

"Per node"  is "find which shapes have the node as a target node and call that shape".

If the specified node isn't in the targets of the data+shapes, you get zero violations.

     Andy

> 
> However, when I validate the entire data graph using method "validate(Shapes shapes, Graph data)" I do get 2 violations. Are these methods designed to work this way?
> 
> I was using Jena 4.1.0 and even when I updated to Jena 4.3.2, I still get the same results.
> 
> I used the old (TQ) shacl playground, which returned 2 violations as well.
> 
> Many thanks
> 
> Yasir
> 
> -----Original Message-----
> From: Andy Seaborne <an...@apache.org>
> Sent: 26 January 2022 20:41
> To: users@jena.apache.org
> Subject: Re: FW: Validation issue
> 
> Yasir,
> 
> What is "work" here?
> 
> I get 2 violations with Jena 4.3.2 - the same as (current latest) TQ 
> shacl. (1 violation on a quite old, pre 4.x.x version of Jena - which 
> version are you running?)
> 
> Which SHACL playground did you use (there are two).
> 
> The old (TopQuadrant) SHACL playground returns 2 violations.
> The Zazuko one returns 2 violations.

> 
> [ rdf:type     sh:ValidationReport ;
>     sh:conforms  false ;
>     sh:result    [
>         rdf:type                      sh:ValidationResult ;
>         sh:focusNode                  yas:Wheel_1 ;
>         sh:resultMessage
>    "Data value \"600\"^^xsd:float is not less than or equal to 200" ;
>         sh:resultPath                 ( yas:hasDiameter yas:hasValue ) ;
>         sh:resultSeverity             sh:Violation ;
>         sh:sourceConstraintComponent  sh:MaxInclusiveConstraintComponent ;
>         sh:sourceShape                []  ;
>         sh:value                      "600"^^xsd:float
>     ] ;
>     sh:result    [
>         rdf:type                      sh:ValidationResult ;
>         sh:focusNode                  yas:Car_1 ;
>         sh:resultMessage
> "QualifiedValueShape[1,_,false]: Min = 1 but got 0 validations" ;
>         sh:resultPath                 yas:hasComponent ;
>         sh:resultSeverity             sh:Violation ;
>         sh:sourceConstraintComponent
>            sh:QualifiedMinCountConstraintComponent ;
>         sh:sourceShape                []
>     ]
> ] .
> 
>       Andy
> 

Re: FW: Validation issue

Posted by Andy Seaborne <an...@apache.org>.
On 26/01/2022 22:49, Alani, Yasir wrote:
> *The node to be validated is "yas:Car_1"
> 
> Thanks again
> 
> -----Original Message-----
> From: Alani, Yasir <Y....@tees.ac.uk>
> Sent: 26 January 2022 22:38
> To: users@jena.apache.org
> Subject: RE: FW: Validation issue
> 
> Hi Andy,
> 
> Thank you for responding.
> 
> What I meant by "work" is producing the correct/expected result, which is the 2 violations you received. The issue only seems to happen when I try to validate a node using the method "validate(Shapes shapes, Graph data, Node node)". The node in this case is "aso:Car_1". This method doesn't seem to 'like' qualified value shapes, as it returns 0 violations.

I get one violation when calling:

shacl v -data data.ttl -shapes shapes.ttl \
     -target 'http://www.semanticweb.org/yas#Wheel_1'

There are two target nodes. yas:Wheel_1 and yas:Car_1

"Per node"  is "find which shapes have the node as a target node and 
call that shape".

If the specified node isn't in the targets of the data+shapes, you get 
zero violations.

     Andy

> 
> However, when I validate the entire data graph using method "validate(Shapes shapes, Graph data)" I do get 2 violations. Are these methods designed to work this way?
> 
> I was using Jena 4.1.0 and even when I updated to Jena 4.3.2, I still get the same results.
> 
> I used the old (TQ) shacl playground, which returned 2 violations as well.
> 
> Many thanks
> 
> Yasir
> 
> -----Original Message-----
> From: Andy Seaborne <an...@apache.org>
> Sent: 26 January 2022 20:41
> To: users@jena.apache.org
> Subject: Re: FW: Validation issue
> 
> Yasir,
> 
> What is "work" here?
> 
> I get 2 violations with Jena 4.3.2 - the same as (current latest) TQ shacl. (1 violation on a quite old, pre 4.x.x version of Jena - which version are you running?)
> 
> Which SHACL playground did you use (there are two).
> 
> The old (TopQuadrant) SHACL playground returns 2 violations.
> The Zazuko one returns 2 violations.

> 
> [ rdf:type     sh:ValidationReport ;
>     sh:conforms  false ;
>     sh:result    [
>         rdf:type                      sh:ValidationResult ;
>         sh:focusNode                  yas:Wheel_1 ;
>         sh:resultMessage
>    "Data value \"600\"^^xsd:float is not less than or equal to 200" ;
>         sh:resultPath                 ( yas:hasDiameter yas:hasValue ) ;
>         sh:resultSeverity             sh:Violation ;
>         sh:sourceConstraintComponent  sh:MaxInclusiveConstraintComponent ;
>         sh:sourceShape                []  ;
>         sh:value                      "600"^^xsd:float
>     ] ;
>     sh:result    [
>         rdf:type                      sh:ValidationResult ;
>         sh:focusNode                  yas:Car_1 ;
>         sh:resultMessage
> "QualifiedValueShape[1,_,false]: Min = 1 but got 0 validations" ;
>         sh:resultPath                 yas:hasComponent ;
>         sh:resultSeverity             sh:Violation ;
>         sh:sourceConstraintComponent
>            sh:QualifiedMinCountConstraintComponent ;
>         sh:sourceShape                []
>     ]
> ] .
> 
>       Andy
> 

RE: FW: Validation issue

Posted by "Alani, Yasir" <Y....@tees.ac.uk>.
*The node to be validated is "yas:Car_1"

Thanks again

-----Original Message-----
From: Alani, Yasir <Y....@tees.ac.uk> 
Sent: 26 January 2022 22:38
To: users@jena.apache.org
Subject: RE: FW: Validation issue

Hi Andy,

Thank you for responding.

What I meant by "work" is producing the correct/expected result, which is the 2 violations you received. The issue only seems to happen when I try to validate a node using the method "validate(Shapes shapes, Graph data, Node node)". The node in this case is "aso:Car_1". This method doesn't seem to 'like' qualified value shapes, as it returns 0 violations. 

However, when I validate the entire data graph using method "validate(Shapes shapes, Graph data)" I do get 2 violations. Are these methods designed to work this way?

I was using Jena 4.1.0 and even when I updated to Jena 4.3.2, I still get the same results.

I used the old (TQ) shacl playground, which returned 2 violations as well.

Many thanks

Yasir

-----Original Message-----
From: Andy Seaborne <an...@apache.org>
Sent: 26 January 2022 20:41
To: users@jena.apache.org
Subject: Re: FW: Validation issue

Yasir,

What is "work" here?

I get 2 violations with Jena 4.3.2 - the same as (current latest) TQ shacl. (1 violation on a quite old, pre 4.x.x version of Jena - which version are you running?)

Which SHACL playground did you use (there are two).

The old (TopQuadrant) SHACL playground returns 2 violations.
The Zazuko one returns 2 violations.

@prefix ex:   <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.example.org%2F%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=UaA6BkiB5E5RdvqfJDcVLHWh%2Bg0ymex%2FHnHFNknZvwk%3D&amp;reserved=0> .
@prefix owl:  <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=xQlZtyYWV%2FTO5HVlLlIXD2qjwIFoAt%2FmPIla%2F2qXmJw%3D&amp;reserved=0> .
@prefix rdf:  <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=fmCQmqP3iOfslINpMOR9wWMSJL1B1PPQvaSpnBSfOQI%3D&amp;reserved=0> .
@prefix rdfs: <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=aRkIzt1jBgel5Z76F%2BObBW%2BRjVzzUHxvkQmDm5FQNSI%3D&amp;reserved=0> .
@prefix sh:   <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=OOpH73p5OpM9tkiWhMnIku6BfyW4MyuV0gc1JGilQ1o%3D&amp;reserved=0> .
@prefix xsd:  <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=hLWu3cDbv5TuPGY1BwlpbFPNDfKeRybEyOvpOVUmH8Q%3D&amp;reserved=0> .
@prefix yas:  <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=Xa466O7yoEOPcweBCzQArHnuvyHnhVPA2GC5yeQVVoM%3D&amp;reserved=0> .

[ rdf:type     sh:ValidationReport ;
   sh:conforms  false ;
   sh:result    [
       rdf:type                      sh:ValidationResult ;
       sh:focusNode                  yas:Wheel_1 ;
       sh:resultMessage
  "Data value \"600\"^^xsd:float is not less than or equal to 200" ;
       sh:resultPath                 ( yas:hasDiameter yas:hasValue ) ;
       sh:resultSeverity             sh:Violation ;
       sh:sourceConstraintComponent  sh:MaxInclusiveConstraintComponent ;
       sh:sourceShape                []  ;
       sh:value                      "600"^^xsd:float
   ] ;
   sh:result    [
       rdf:type                      sh:ValidationResult ;
       sh:focusNode                  yas:Car_1 ;
       sh:resultMessage
"QualifiedValueShape[1,_,false]: Min = 1 but got 0 validations" ;
       sh:resultPath                 yas:hasComponent ;
       sh:resultSeverity             sh:Violation ;
       sh:sourceConstraintComponent
          sh:QualifiedMinCountConstraintComponent ;
       sh:sourceShape                []
   ]
] .

     Andy

On 26/01/2022 16:38, Alani, Yasir wrote:
> 
> 
> From: Alani, Yasir
> Sent: 26 January 2022 14:07
> To: Andy Seaborne <an...@apache.org>
> Subject: Validation issue
> 
> Hi, I have a shape that doesn’t seem to work with Jena (always conforms) but works when I try it on SHACL Playground.
> 
> The shape:
> @prefix rdf:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=fmCQmqP3iOfslINpMOR9wWMSJL1B1PPQvaSpnBSfOQI%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=FLKXcMWHo%2FdQwIXJ7MKULaRqww3iWBuZxzEOO6zMV30%3D&amp;reserved=0> .
> @prefix sh:    https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=OOpH73p5OpM9tkiWhMnIku6BfyW4MyuV0gc1JGilQ1o%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=XINsTCWztdPfn6bS5U0JuoXqfeb4L5xDuWLTuW9F240%3D&amp;reserved=0> .
> @prefix xsd:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=hLWu3cDbv5TuPGY1BwlpbFPNDfKeRybEyOvpOVUmH8Q%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=PB2MdNg%2FJRM5BpeeRHvSpos7fC0cKQgp%2BF%2BHYgfqHqA%3D&amp;reserved=0> .
> @prefix rdfs:  https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=aRkIzt1jBgel5Z76F%2BObBW%2BRjVzzUHxvkQmDm5FQNSI%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=pZLkWu3qD1KmCTXZAxsLxcW%2Bd2tR52%2BQQcoUFyS0uhE%3D&amp;reserved=0> .
> @prefix ex:    https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.example.org%2F%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=UaA6BkiB5E5RdvqfJDcVLHWh%2Bg0ymex%2FHnHFNknZvwk%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.example.org%2F&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=KJP76QAy%2FfwHU%2F8X6GpznKKLSVDGxwAiqmloF4JPiVA%3D&amp;reserved=0> .
> @prefix owl:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=xQlZtyYWV%2FTO5HVlLlIXD2qjwIFoAt%2FmPIla%2F2qXmJw%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=vaJOR25NzYesgK63HeA%2F6jztnJupjr1QKbtbvLC2Q2w%3D&amp;reserved=0> .
> @prefix yas:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=Xa466O7yoEOPcweBCzQArHnuvyHnhVPA2GC5yeQVVoM%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=UDK5uk69No1%2FHPvdfPtklMz8BVwYyQv9D15937PoIgE%3D&amp;reserved=0> .
> 
> yas:CarShape a sh:NodeShape ;
>                 sh:targetClass yas:Car ; sh:property [ sh:path 
> yas:hasComponent ; sh:qualifiedValueShape [ sh:targetClass yas:Wheel ; sh:property [ sh:path (yas:hasDiameter yas:hasValue) ; sh:minInclusive 0 ; sh:maxInclusive 200 ; sh:datatype xsd:float ; ] ; ] ; sh:qualifiedMinCount 1 ] .
> 
> The data:
> @prefix rdf:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=fmCQmqP3iOfslINpMOR9wWMSJL1B1PPQvaSpnBSfOQI%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=FLKXcMWHo%2FdQwIXJ7MKULaRqww3iWBuZxzEOO6zMV30%3D&amp;reserved=0> .
> @prefix sh:    https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=OOpH73p5OpM9tkiWhMnIku6BfyW4MyuV0gc1JGilQ1o%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=XINsTCWztdPfn6bS5U0JuoXqfeb4L5xDuWLTuW9F240%3D&amp;reserved=0> .
> @prefix xsd:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=hLWu3cDbv5TuPGY1BwlpbFPNDfKeRybEyOvpOVUmH8Q%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=PB2MdNg%2FJRM5BpeeRHvSpos7fC0cKQgp%2BF%2BHYgfqHqA%3D&amp;reserved=0> .
> @prefix rdfs:  https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=aRkIzt1jBgel5Z76F%2BObBW%2BRjVzzUHxvkQmDm5FQNSI%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=pZLkWu3qD1KmCTXZAxsLxcW%2Bd2tR52%2BQQcoUFyS0uhE%3D&amp;reserved=0> .
> @prefix ex:    https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.example.org%2F%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=UaA6BkiB5E5RdvqfJDcVLHWh%2Bg0ymex%2FHnHFNknZvwk%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.example.org%2F&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=KJP76QAy%2FfwHU%2F8X6GpznKKLSVDGxwAiqmloF4JPiVA%3D&amp;reserved=0> .
> @prefix owl:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=xQlZtyYWV%2FTO5HVlLlIXD2qjwIFoAt%2FmPIla%2F2qXmJw%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=vaJOR25NzYesgK63HeA%2F6jztnJupjr1QKbtbvLC2Q2w%3D&amp;reserved=0> .
> @prefix yas:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=Xa466O7yoEOPcweBCzQArHnuvyHnhVPA2GC5yeQVVoM%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=UDK5uk69No1%2FHPvdfPtklMz8BVwYyQv9D15937PoIgE%3D&amp;reserved=0> .
> 
> yas:Car_1 rdf:type owl:NamedIndividual ,
>                             yas:Car ;
>                    yas:hasComponent yas:Wheel_1 .
> 
> yas:Wheel_1 rdf:type owl:NamedIndividual ,
>                              yas:Wheel ;
>                     yas:hasDiameter yas:Diameter2 .
> 
> yas:Diameter2 rdf:type owl:NamedIndividual ,
>                       yas:Diameter ;
>              yas:hasValue "600"^^xsd:float .
> 
> 
> I am using ShaclValidator method ==> validate<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjena.apache.org%2Fdocumentation%2Fjavadoc%2Fshacl%2Forg.apache.jena.shacl%2Forg%2Fapache%2Fjena%2Fshacl%2FShaclValidator.html%23validate&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=swlMyl%2BaJS2XQLoOmUBKWMyfz6r9HbHo0msf8JTNGWc%3D&amp;reserved=0(org.apache.jena.shacl.Shapes,org.apache.jena.graph.Graph,org.apache.jena.graph.Node)>​(Shapes<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjena.apache.org%2Fdocumentation%2Fjavadoc%2Fshacl%2Forg.apache.jena.shacl%2Forg%2Fapache%2Fjena%2Fshacl%2FShapes.html&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=FbOFUNS2rDCnd4yKCClgWV964xGKemQrB25bxGXbbqo%3D&amp;reserved=0> shapes, Graph<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjena.apache.org%2Fdocumentation%2Fjavadoc%2Fjena%2Forg%2Fapache%2Fjena%2Fgraph%2FGraph.html%3Fis-external%3Dtrue&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=ylZzwFgMhiHl%2F9LjZBb6DxSTVCNOYIoO33%2FV%2FGZTRms%3D&amp;reserved=0> data, Node<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjena.apache.org%2Fdocumentation%2Fjavadoc%2Fjena%2Forg%2Fapache%2Fjena%2Fgraph%2FNode.html%3Fis-external%3Dtrue&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C34aaf5a765754475e1ce08d9e11c82f7%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788334861795406%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=sK8iW62RRVKPqx10x0k%2F64C%2FK2SR6K3LhHGSFM2sKpA%3D&amp;reserved=0> node).
> 
> Please advise if you can.
> Regards
> Yasir
> 
> 

RE: FW: Validation issue

Posted by "Alani, Yasir" <Y....@tees.ac.uk>.
Hi Andy,

Thank you for responding.

What I meant by "work" is producing the correct/expected result, which is the 2 violations you received. The issue only seems to happen when I try to validate a node using the method "validate(Shapes shapes, Graph data, Node node)". The node in this case is "aso:Car_1". This method doesn't seem to 'like' qualified value shapes, as it returns 0 violations. 

However, when I validate the entire data graph using method "validate(Shapes shapes, Graph data)" I do get 2 violations. Are these methods designed to work this way?

I was using Jena 4.1.0 and even when I updated to Jena 4.3.2, I still get the same results.

I used the old (TQ) shacl playground, which returned 2 violations as well.

Many thanks

Yasir

-----Original Message-----
From: Andy Seaborne <an...@apache.org> 
Sent: 26 January 2022 20:41
To: users@jena.apache.org
Subject: Re: FW: Validation issue

Yasir,

What is "work" here?

I get 2 violations with Jena 4.3.2 - the same as (current latest) TQ shacl. (1 violation on a quite old, pre 4.x.x version of Jena - which version are you running?)

Which SHACL playground did you use (there are two).

The old (TopQuadrant) SHACL playground returns 2 violations.
The Zazuko one returns 2 violations.

@prefix ex:   <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.example.org%2F%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=N5fLQmcYzp8FMmrKuJDOrZa9sVA6zOOCVoQ5EcynSOA%3D&amp;reserved=0> .
@prefix owl:  <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=oePMrdzQVvyNOoOej1M8rK2nede202xlAjQ2dbmkN8Q%3D&amp;reserved=0> .
@prefix rdf:  <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=pen3cU191oTjmgEDQUCTMOV1XiEghQu%2F1WH9qnORKS0%3D&amp;reserved=0> .
@prefix rdfs: <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=tUGpgRFSim1SbpjtCdressY3wGfiaPJ9GKEOc77CQYY%3D&amp;reserved=0> .
@prefix sh:   <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=yEXEeglKoIHjox%2BR5gsuSDWeWqAFGn01W1KqiwOF0%2BY%3D&amp;reserved=0> .
@prefix xsd:  <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=5ShU8jl3s5eLYPwa3BIl3fgJzCtRD5ApyYRwsawQyWs%3D&amp;reserved=0> .
@prefix yas:  <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=M2UNNH%2BT0VCxW2G%2BQhr42YNzbfp8bpbwzrew7P%2BHs%2F4%3D&amp;reserved=0> .

[ rdf:type     sh:ValidationReport ;
   sh:conforms  false ;
   sh:result    [
       rdf:type                      sh:ValidationResult ;
       sh:focusNode                  yas:Wheel_1 ;
       sh:resultMessage
  "Data value \"600\"^^xsd:float is not less than or equal to 200" ;
       sh:resultPath                 ( yas:hasDiameter yas:hasValue ) ;
       sh:resultSeverity             sh:Violation ;
       sh:sourceConstraintComponent  sh:MaxInclusiveConstraintComponent ;
       sh:sourceShape                []  ;
       sh:value                      "600"^^xsd:float
   ] ;
   sh:result    [
       rdf:type                      sh:ValidationResult ;
       sh:focusNode                  yas:Car_1 ;
       sh:resultMessage
"QualifiedValueShape[1,_,false]: Min = 1 but got 0 validations" ;
       sh:resultPath                 yas:hasComponent ;
       sh:resultSeverity             sh:Violation ;
       sh:sourceConstraintComponent
          sh:QualifiedMinCountConstraintComponent ;
       sh:sourceShape                []
   ]
] .

     Andy

On 26/01/2022 16:38, Alani, Yasir wrote:
> 
> 
> From: Alani, Yasir
> Sent: 26 January 2022 14:07
> To: Andy Seaborne <an...@apache.org>
> Subject: Validation issue
> 
> Hi, I have a shape that doesn’t seem to work with Jena (always conforms) but works when I try it on SHACL Playground.
> 
> The shape:
> @prefix rdf:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=pen3cU191oTjmgEDQUCTMOV1XiEghQu%2F1WH9qnORKS0%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=2qmxnsy6Recdr9vzNFzPFCMSfWXeEj0aGWgVrCYwb6s%3D&amp;reserved=0> .
> @prefix sh:    https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=yEXEeglKoIHjox%2BR5gsuSDWeWqAFGn01W1KqiwOF0%2BY%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=EeAG%2BTd9ku7S9i2vPHV9D8lMNw%2BB2OtVLBSFVNdG%2BOI%3D&amp;reserved=0> .
> @prefix xsd:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=5ShU8jl3s5eLYPwa3BIl3fgJzCtRD5ApyYRwsawQyWs%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=%2FpxR7SJuymxFz0RYeVruunxct7vJbH%2FizFAlSDAT2sA%3D&amp;reserved=0> .
> @prefix rdfs:  https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=tUGpgRFSim1SbpjtCdressY3wGfiaPJ9GKEOc77CQYY%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=wUNT%2FAeE5T%2F%2FMYUveIsBL8%2FDJXwZFtemRzI3RfiQoes%3D&amp;reserved=0> .
> @prefix ex:    https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.example.org%2F%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=N5fLQmcYzp8FMmrKuJDOrZa9sVA6zOOCVoQ5EcynSOA%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.example.org%2F&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=gUyeNIAcnzns46FqLuZFMCZbNlp8VjR1yI5wZxtHn2k%3D&amp;reserved=0> .
> @prefix owl:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=oePMrdzQVvyNOoOej1M8rK2nede202xlAjQ2dbmkN8Q%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=7TWLZ75UNJ26XSa%2BzQV2SNtlZsFwguYeX2TZ6v9NcJo%3D&amp;reserved=0> .
> @prefix yas:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=M2UNNH%2BT0VCxW2G%2BQhr42YNzbfp8bpbwzrew7P%2BHs%2F4%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=fzuA76toWc6xc5r2c3VpvmI5mH5ILq8Sy5xJgULXeUk%3D&amp;reserved=0> .
> 
> yas:CarShape a sh:NodeShape ;
>                 sh:targetClass yas:Car ; sh:property [ sh:path 
> yas:hasComponent ; sh:qualifiedValueShape [ sh:targetClass yas:Wheel ; sh:property [ sh:path (yas:hasDiameter yas:hasValue) ; sh:minInclusive 0 ; sh:maxInclusive 200 ; sh:datatype xsd:float ; ] ; ] ; sh:qualifiedMinCount 1 ] .
> 
> The data:
> @prefix rdf:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=pen3cU191oTjmgEDQUCTMOV1XiEghQu%2F1WH9qnORKS0%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=2qmxnsy6Recdr9vzNFzPFCMSfWXeEj0aGWgVrCYwb6s%3D&amp;reserved=0> .
> @prefix sh:    https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=yEXEeglKoIHjox%2BR5gsuSDWeWqAFGn01W1KqiwOF0%2BY%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2Fns%2Fshacl&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=EeAG%2BTd9ku7S9i2vPHV9D8lMNw%2BB2OtVLBSFVNdG%2BOI%3D&amp;reserved=0> .
> @prefix xsd:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=5ShU8jl3s5eLYPwa3BIl3fgJzCtRD5ApyYRwsawQyWs%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=%2FpxR7SJuymxFz0RYeVruunxct7vJbH%2FizFAlSDAT2sA%3D&amp;reserved=0> .
> @prefix rdfs:  https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=tUGpgRFSim1SbpjtCdressY3wGfiaPJ9GKEOc77CQYY%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=wUNT%2FAeE5T%2F%2FMYUveIsBL8%2FDJXwZFtemRzI3RfiQoes%3D&amp;reserved=0> .
> @prefix ex:    https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.example.org%2F%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=N5fLQmcYzp8FMmrKuJDOrZa9sVA6zOOCVoQ5EcynSOA%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.example.org%2F&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=gUyeNIAcnzns46FqLuZFMCZbNlp8VjR1yI5wZxtHn2k%3D&amp;reserved=0> .
> @prefix owl:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=oePMrdzQVvyNOoOej1M8rK2nede202xlAjQ2dbmkN8Q%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=7TWLZ75UNJ26XSa%2BzQV2SNtlZsFwguYeX2TZ6v9NcJo%3D&amp;reserved=0> .
> @prefix yas:   https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas%23&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=M2UNNH%2BT0VCxW2G%2BQhr42YNzbfp8bpbwzrew7P%2BHs%2F4%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticweb.org%2Fyas&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=fzuA76toWc6xc5r2c3VpvmI5mH5ILq8Sy5xJgULXeUk%3D&amp;reserved=0> .
> 
> yas:Car_1 rdf:type owl:NamedIndividual ,
>                             yas:Car ;
>                    yas:hasComponent yas:Wheel_1 .
> 
> yas:Wheel_1 rdf:type owl:NamedIndividual ,
>                              yas:Wheel ;
>                     yas:hasDiameter yas:Diameter2 .
> 
> yas:Diameter2 rdf:type owl:NamedIndividual ,
>                       yas:Diameter ;
>              yas:hasValue "600"^^xsd:float .
> 
> 
> I am using ShaclValidator method ==> validate<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjena.apache.org%2Fdocumentation%2Fjavadoc%2Fshacl%2Forg.apache.jena.shacl%2Forg%2Fapache%2Fjena%2Fshacl%2FShaclValidator.html%23validate&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=kQzDnhs8o0DjZIWqI3SFVGiP6yMV6FdukP2kab7QGXE%3D&amp;reserved=0(org.apache.jena.shacl.Shapes,org.apache.jena.graph.Graph,org.apache.jena.graph.Node)>​(Shapes<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjena.apache.org%2Fdocumentation%2Fjavadoc%2Fshacl%2Forg.apache.jena.shacl%2Forg%2Fapache%2Fjena%2Fshacl%2FShapes.html&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=pIzeoJzkYxsttuMKRmZKOUz208YKKNh85KCdRXJSdLM%3D&amp;reserved=0> shapes, Graph<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjena.apache.org%2Fdocumentation%2Fjavadoc%2Fjena%2Forg%2Fapache%2Fjena%2Fgraph%2FGraph.html%3Fis-external%3Dtrue&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=WA9FREpXLh1iFghKw6Xvx1dak0MNbAjFPIAPICxt3VM%3D&amp;reserved=0> data, Node<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fjena.apache.org%2Fdocumentation%2Fjavadoc%2Fjena%2Forg%2Fapache%2Fjena%2Fgraph%2FNode.html%3Fis-external%3Dtrue&amp;data=04%7C01%7CY.Alani%40tees.ac.uk%7C765e28a689d94015461a08d9e10c41c6%7C43d2115ba55e46b69df7b03388ecfc60%7C0%7C1%7C637788265051947982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=eQJ5oNVO7z1KISEnEMWzGhjxaCj1SwidR2aJ2qzU0fU%3D&amp;reserved=0> node).
> 
> Please advise if you can.
> Regards
> Yasir
> 
> 

Re: FW: Validation issue

Posted by Andy Seaborne <an...@apache.org>.
Yasir,

What is "work" here?

I get 2 violations with Jena 4.3.2 - the same as (current latest) TQ 
shacl. (1 violation on a quite old, pre 4.x.x version of Jena - which 
version are you running?)

Which SHACL playground did you use (there are two).

The old (TopQuadrant) SHACL playground returns 2 violations.
The Zazuko one returns 2 violations.

@prefix ex:   <http://www.example.org/#> .
@prefix owl:  <http://www.w3.org/2002/07/owl#> .
@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh:   <http://www.w3.org/ns/shacl#> .
@prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
@prefix yas:  <http://www.semanticweb.org/yas#> .

[ rdf:type     sh:ValidationReport ;
   sh:conforms  false ;
   sh:result    [
       rdf:type                      sh:ValidationResult ;
       sh:focusNode                  yas:Wheel_1 ;
       sh:resultMessage
  "Data value \"600\"^^xsd:float is not less than or equal to 200" ;
       sh:resultPath                 ( yas:hasDiameter yas:hasValue ) ;
       sh:resultSeverity             sh:Violation ;
       sh:sourceConstraintComponent  sh:MaxInclusiveConstraintComponent ;
       sh:sourceShape                []  ;
       sh:value                      "600"^^xsd:float
   ] ;
   sh:result    [
       rdf:type                      sh:ValidationResult ;
       sh:focusNode                  yas:Car_1 ;
       sh:resultMessage
"QualifiedValueShape[1,_,false]: Min = 1 but got 0 validations" ;
       sh:resultPath                 yas:hasComponent ;
       sh:resultSeverity             sh:Violation ;
       sh:sourceConstraintComponent
          sh:QualifiedMinCountConstraintComponent ;
       sh:sourceShape                []
   ]
] .

     Andy

On 26/01/2022 16:38, Alani, Yasir wrote:
> 
> 
> From: Alani, Yasir
> Sent: 26 January 2022 14:07
> To: Andy Seaborne <an...@apache.org>
> Subject: Validation issue
> 
> Hi, I have a shape that doesn’t seem to work with Jena (always conforms) but works when I try it on SHACL Playground.
> 
> The shape:
> @prefix rdf:   http://www.w3.org/1999/02/22-rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns> .
> @prefix sh:    http://www.w3.org/ns/shacl#<http://www.w3.org/ns/shacl> .
> @prefix xsd:   http://www.w3.org/2001/XMLSchema#<http://www.w3.org/2001/XMLSchema> .
> @prefix rdfs:  http://www.w3.org/2000/01/rdf-schema#<http://www.w3.org/2000/01/rdf-schema> .
> @prefix ex:    http://www.example.org/#<http://www.example.org/> .
> @prefix owl:   http://www.w3.org/2002/07/owl#<http://www.w3.org/2002/07/owl> .
> @prefix yas:   http://www.semanticweb.org/yas#<http://www.semanticweb.org/yas> .
> 
> yas:CarShape a sh:NodeShape ;
>                 sh:targetClass yas:Car ;
> sh:property [ sh:path yas:hasComponent ; sh:qualifiedValueShape [ sh:targetClass yas:Wheel ; sh:property [ sh:path (yas:hasDiameter yas:hasValue) ; sh:minInclusive 0 ; sh:maxInclusive 200 ; sh:datatype xsd:float ; ] ; ] ; sh:qualifiedMinCount 1 ] .
> 
> The data:
> @prefix rdf:   http://www.w3.org/1999/02/22-rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns> .
> @prefix sh:    http://www.w3.org/ns/shacl#<http://www.w3.org/ns/shacl> .
> @prefix xsd:   http://www.w3.org/2001/XMLSchema#<http://www.w3.org/2001/XMLSchema> .
> @prefix rdfs:  http://www.w3.org/2000/01/rdf-schema#<http://www.w3.org/2000/01/rdf-schema> .
> @prefix ex:    http://www.example.org/#<http://www.example.org/> .
> @prefix owl:   http://www.w3.org/2002/07/owl#<http://www.w3.org/2002/07/owl> .
> @prefix yas:   http://www.semanticweb.org/yas#<http://www.semanticweb.org/yas> .
> 
> yas:Car_1 rdf:type owl:NamedIndividual ,
>                             yas:Car ;
>                    yas:hasComponent yas:Wheel_1 .
> 
> yas:Wheel_1 rdf:type owl:NamedIndividual ,
>                              yas:Wheel ;
>                     yas:hasDiameter yas:Diameter2 .
> 
> yas:Diameter2 rdf:type owl:NamedIndividual ,
>                       yas:Diameter ;
>              yas:hasValue "600"^^xsd:float .
> 
> 
> I am using ShaclValidator method ==> validate<https://jena.apache.org/documentation/javadoc/shacl/org.apache.jena.shacl/org/apache/jena/shacl/ShaclValidator.html#validate(org.apache.jena.shacl.Shapes,org.apache.jena.graph.Graph,org.apache.jena.graph.Node)>​(Shapes<https://jena.apache.org/documentation/javadoc/shacl/org.apache.jena.shacl/org/apache/jena/shacl/Shapes.html> shapes, Graph<https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/graph/Graph.html?is-external=true> data, Node<https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/graph/Node.html?is-external=true> node).
> 
> Please advise if you can.
> Regards
> Yasir
> 
>