ISSUE-178: Should sh:message be permitted at constraints, too?

sh:message constraints

Should sh:message be permitted at constraints, too?

State:
CLOSED
Product:
SHACL - Core
Raised by:
Holger Knublauch
Opened on:
2016-09-21
Description:
I believe SHACL should allow sh:message to be used at each constraint instance. If present, this sh:message should be preferred over the default messages stored by the constraint components.

Example (real case from TopBraid, actually):

configconstraints:ConfigShape
rdf:type sh:Shape ;
sh:property [
sh:predicate cfg:teamworkRootProject ;
sh:pattern "^[a-zA-Z_\\.]+$" ;
] ;
sh:targetClass cfg:ServerConfiguration .

The user should see a message such as "The root project name may only contain letters or the dot", but there is no way to specify this right now. What I want is:

configconstraints:ConfigShape
rdf:type sh:Shape ;
sh:property [
sh:predicate cfg:teamworkRootProject ;
sh:pattern "^[a-zA-Z_\\.]+$" ;
sh:message "The root project name may only contain letters or the dot" ;
] ;
sh:targetClass cfg:ServerConfiguration .

Note that the message would apply to all violations produced by the constraint, even across multiple constraint components, but I believe that's acceptable because the shape designer has the choice to bundle only those constraint components that belong together.
Related Actions Items:
No related actions
Related emails:
  1. Re: shapes-ISSUE-178 (sh:message constraints): Should sh:message be permitted at constraints, too? [SHACL - Core] (from kcoyle@kcoyle.net on 2016-10-11)
  2. Re: shapes-ISSUE-178 (sh:message constraints): Should sh:message be permitted at constraints, too? [SHACL - Core] (from holger@topquadrant.com on 2016-10-11)
  3. Re: shapes-ISSUE-178 (sh:message constraints): Should sh:message be permitted at constraints, too? [SHACL - Core] (from holger@topquadrant.com on 2016-10-11)
  4. Re: shapes-ISSUE-178 (sh:message constraints): Should sh:message be permitted at constraints, too? [SHACL - Core] (from kcoyle@kcoyle.net on 2016-10-10)
  5. Re: shapes-ISSUE-187 (severity and message): sh:severity and sh:message are not defined as shapes graph properties (from holger@topquadrant.com on 2016-10-10)
  6. Re: shapes-ISSUE-187 (severity and message): sh:severity and sh:message are not defined as shapes graph properties (from holger@topquadrant.com on 2016-10-10)
  7. Re: shapes-ISSUE-178 (sh:message constraints): Should sh:message be permitted at constraints, too? [SHACL - Core] (from kcoyle@kcoyle.net on 2016-10-09)
  8. Re: shapes-ISSUE-187 (severity and message): sh:severity and sh:message are not defined as shapes graph properties (from kcoyle@kcoyle.net on 2016-10-09)
  9. Re: shapes-ISSUE-187 (severity and message): sh:severity and sh:message are not defined as shapes graph properties (from kcoyle@kcoyle.net on 2016-10-09)
  10. Re: shapes-ISSUE-181: SHACL conformance for partial validation reports [SHACL Spec] (from kcoyle@kcoyle.net on 2016-09-30)
  11. Re: shapes-ISSUE-181: SHACL conformance for partial validation reports [SHACL Spec] (from holger@topquadrant.com on 2016-09-30)
  12. Re: shapes-ISSUE-178 (sh:message constraints): Should sh:message be permitted at constraints, too? [SHACL - Core] (from holger@topquadrant.com on 2016-09-22)
  13. shapes-ISSUE-178 (sh:message constraints): Should sh:message be permitted at constraints, too? [SHACL - Core] (from sysbot+tracker@w3.org on 2016-09-21)

Related notes:

Implemented as

https://github.com/w3c/data-shapes/commit/f443242c728ba76c3b46ff55dec976b67fc422bd

Holger Knublauch, 11 Oct 2016, 23:41:22

RESOLUTION: Close ISSUE-178, accepting the proposal to allow sh:message to be used in core on a constraint to override the implementation default message
See https://www.w3.org/2016/10/11-shapes-minutes.html#resolution03

Arnaud Le Hors, 18 Oct 2016, 14:33:47

Display change log ATOM feed


Chair, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: 178.html,v 1.1 2018/11/26 09:03:32 carine Exp $