[
https://issues.apache.org/jira/browse/JENA-2345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17579617#comment-17579617
]
ASF subversion and git services commented on JENA-2345:
-------------------------------------------------------
Commit 36de811f7bf42f90e2995c1c304547be1b3f389c in jena's branch
refs/heads/main from Andy Seaborne
[ https://gitbox.apache.org/repos/asf?p=jena.git;h=36de811f7b ]
Merge pull request #1479 from afs/jena2345-sh-datatype
JENA-2345: Better report message for DatatypeConstraint
> 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: [email protected]
For additional commands, e-mail: [email protected]