You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@jena.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/03/23 17:15:00 UTC

[jira] [Commented] (JENA-2316) SHACL: SPARQL validation message formatting inconsistency

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

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

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

JENA-2316: Correct node formatting in SPARQL constraints


> SHACL: SPARQL validation message formatting inconsistency
> ---------------------------------------------------------
>
>                 Key: JENA-2316
>                 URL: https://issues.apache.org/jira/browse/JENA-2316
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: SHACL
>            Reporter: Jakub Wach
>            Assignee: Andy Seaborne
>            Priority: Minor
>             Fix For: Jena 4.5.0
>
>         Attachments: SHACL__SPARQL_validation_message_formatting_inconsistency.patch
>
>
> It seems that SparqlValidation class inconsistently formats the nodes in the messages while reporting the issues:
>  * default message "SPARQL SELECT constraint for" uses ShLib.displayStr(valueNode)
>  * custom message provided in _sh:message_ is using NodeFmtLib.str
> The issues:
>  * Inconsistency
>  ** On the default settings there is no difference.
>  ** However, ShLib formats nodes (at least references) according to the ShLib.nodeFmtAbbrev (it is not final). 
>  ** Two separate formatter instances could present different and inconsistent results.
>  * Why static non-configurable formatting of nodes might be a bad idea?
>  ** Apart from possibility to formatting the literals (dates) in a controllable and configurable way...
>  ** Bnode labels are also affected. Default (NodeToLabel) formatting is using X00/X00X000 escaping (by default this is the way how bnode labels are presented in those messages). This escaping is non-deterministic (unlike UTF8). 
>  ** Ability in ShLib to modify the NodeFormatterTTL addressed those issues (although static configuration has its own issues) by making it at least controllable (e.g. by using NodeToLabel.createBNodeByLabelAsGiven).
> Path for that possibly very simple fix is provided.
> Way to reproduce issue:   JENA-2315 (just comment sh:message in shape definition)



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

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