You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@jena.apache.org by "Andy Seaborne (Jira)" <ji...@apache.org> on 2022/08/14 10:53:00 UTC

[jira] [Commented] (JENA-2345) DatatypeConstraint could produce missleading message

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

Andy Seaborne commented on JENA-2345:
-------------------------------------

Hi [~jak_ub] – thank you for the report and patch. I used the patch and changed the violation message to be expected/action and value seen.

[Pull request 1479|https://github.com/apache/jena/pull/1479].

 

> DatatypeConstraint could produce missleading message
> ----------------------------------------------------
>
>                 Key: JENA-2345
>                 URL: https://issues.apache.org/jira/browse/JENA-2345
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: SHACL, ShEx
>    Affects Versions: Jena 4.5.0
>            Reporter: Jakub Wach
>            Priority: Minor
>         Attachments: DatatypeConstraint.patch
>
>
> Description:
>  * SHACL implementation class DatatypeConstraint could return misleading message when datatype of the literal node does violates the shape. e.g:
>  ** `{color:#6a8759}Got datatype xs:int : Node {color}{color:#cc7832}\"{color}{color:#6a8759}strValue2{color}{color:#cc7832}\"{color}`
>  ** Current implementation does either quote expected datatype or actual datatype of the node. It all depends on prefix mapping! 
>  * Shape/constraint: https://www.w3.org/TR/shacl/#DatatypeConstraintComponent
> Possible solutions: 
>  * Always use expected data type:
>  ** Possible messages:
>  *** {color:#6a8759}`Expected datatype xs:int : Node {color}{color:#cc7832}\"{color}{color:#6a8759}strValue2{color}{color:#cc7832}\"{color}`,  
>  *** {color:#6a8759}`Expected datatype <http://......./....> : Node {color}{color:#cc7832}\"{color}{color:#6a8759}strValue2{color}{color:#cc7832}\"{color}`
>  ** Keeps possibility to use prefix
>  ** Somewhat consistent with ClassConstraint
>  ** Possible patch in attachments (not tested!).
>  * Alternatively message could be similar to SHEX equivalent.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: jira-unsubscribe@jena.apache.org
For additional commands, e-mail: jira-help@jena.apache.org