afs commented on issue #3147:
URL: https://github.com/apache/jena/issues/3147#issuecomment-2828133357

   Yes, it supports `sh:SPARQLTarget`.
   
   I get 2 violations with 
[corrected_github-issue-3147.zip](https://github.com/user-attachments/files/19889852/corrected_github-issue-3147.zip),
 and three violations if I change the SPARQL target query to have 
`rdf:type/rdfs:subClassOf*`.
   
   `shacl validate -v -s shapes.ttl -d data.ttl`
   
   ```
   NodeShape[http://example.org/DerivedShape]
   N: FocusNodes(3): [http://example.org/ValidDerivedInstance1, 
http://example.org/InvalidDerivedInstance2, 
http://example.org/InvalidDerivedInstance3]
     F: http://example.org/ValidDerivedInstance1
       S: NodeShape[http://example.org/DerivedShape]
       P: PropertyShape[http://example.org/SomethingRequiredShape -> 
<http://example.org/something>]
         C: http://example.org/ValidDerivedInstance1 :: maxCount[1]
         C: http://example.org/ValidDerivedInstance1 :: minCount[1]
     F: http://example.org/InvalidDerivedInstance2
       S: NodeShape[http://example.org/DerivedShape]
       P: PropertyShape[http://example.org/SomethingRequiredShape -> 
<http://example.org/something>]
         C: http://example.org/InvalidDerivedInstance2 :: maxCount[1]
         C: http://example.org/InvalidDerivedInstance2 :: minCount[1]
   Validation report entry
     F: http://example.org/InvalidDerivedInstance3
       S: NodeShape[http://example.org/DerivedShape]
       P: PropertyShape[http://example.org/SomethingRequiredShape -> 
<http://example.org/something>]
         C: http://example.org/InvalidDerivedInstance3 :: maxCount[1]
   Validation report entry
         C: http://example.org/InvalidDerivedInstance3 :: minCount[1]
   
   PREFIX ex:   <http://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#>
   
   [ rdf:type     sh:ValidationReport;
     sh:conforms  false;
     sh:result    [ rdf:type                      sh:ValidationResult;
                    sh:focusNode                  ex:InvalidDerivedInstance3;
                    sh:resultMessage              "A derived instance MUST have 
exactly one ex:something predicate";
                    sh:resultPath                 ex:something;
                    sh:resultSeverity             sh:Violation;
                    sh:sourceConstraintComponent  
sh:MaxCountConstraintComponent;
                    sh:sourceShape                ex:SomethingRequiredShape
                  ];
     sh:result    [ rdf:type                      sh:ValidationResult;
                    sh:focusNode                  ex:InvalidDerivedInstance2;
                    sh:resultMessage              "A derived instance MUST have 
exactly one ex:something predicate";
                    sh:resultPath                 ex:something;
                    sh:resultSeverity             sh:Violation;
                    sh:sourceConstraintComponent  
sh:MinCountConstraintComponent;
                    sh:sourceShape                ex:SomethingRequiredShape
                  ]
   ] .
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to