Jakub Wach created JENA-2316:
--------------------------------
Summary: 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
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: [email protected]
For additional commands, e-mail: [email protected]