[ 
https://issues.apache.org/jira/browse/JENA-2315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17511384#comment-17511384
 ] 

ASF subversion and git services commented on JENA-2315:
-------------------------------------------------------

Commit 4a5acd4bf4a810e1386bb4839be5c6a5a8c50b1d in jena's branch 
refs/heads/main from Andy Seaborne
[ https://gitbox.apache.org/repos/asf?p=jena.git;h=4a5acd4 ]

JENA-2315: Fix validation of node in extension target


> SHACL: bug in execution of  SPARQL validation for a specified focusNode via 
> validation API
> ------------------------------------------------------------------------------------------
>
>                 Key: JENA-2315
>                 URL: https://issues.apache.org/jira/browse/JENA-2315
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: SHACL
>    Affects Versions: Jena 4.4.0
>            Reporter: Jakub Wach
>            Assignee: Andy Seaborne
>            Priority: Minor
>             Fix For: Jena 4.5.0
>
>         Attachments: 
> SHACL__bug_in_execution_of__SPARQL_validation_for_a_specified_focusNode_via_validation_API.patch
>
>
> *Description:* 
> While running validation focused on single explicit focus node.  It seems 
> that due to the missing return statement validation will never be effective 
> at all.
> *Reproduction:*
> While running validation focused on single resource node. E.g. by calling:
> ```
> new ShaclPlainValidator().validate(shapes, data, node);
> ```
> *Example data:* 
> ```
> <{color:#0000ff}someResource{color}>
>      a <{color:#0000ff}someClass{color}> ;
>     <{color:#0000ff}someunknownProperty{color}> 
> <{color:#0000ff}someUnimportantValue{color}> ;
> .
> ```
> *Example shape:*
> ```
> <propertyShape
>     a              sh:NodeShape ;
>     sh:severity    sh:Warning ;
>     sh:target [
>                   a sh:SPARQLTarget ;   
>                   sh:select """
>                         SELECT DISTINCT ?node
>                         WHERE {
>                             ?node a ?class .
>                         }
>                         """ ;
>               ] ;    
>     sh:sparql      [ sh:message "Resource \{$this} has unknown property 
> \{$path}" ;
>                      sh:select """
>                             SELECT DISTINCT $this ?path
>                             WHERE {
>                                 $this ?path ?value .
>                                 $this a ?class .
>                                 FILTER NOT EXISTS {
>                                      ?path 
> <http://www.w3.org/2000/01/rdf-schema#domain> ?class
>                                 }
>                             }
>                         """ ] ;
> .
> ```



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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

Reply via email to