- From: Holger Knublauch <holger@topquadrant.com>
- Date: Thu, 22 Sep 2016 10:27:11 +1000
- To: public-data-shapes-wg@w3.org
PROPOSAL: Add sh:message as outlined in the description of the ISSUE. If present, then the sh:message attached to a constraint (e.g. sh:property) is used with precedence over the default message (from the constraint component). Holger On 21/09/2016 15:21, RDF Data Shapes Working Group Issue Tracker wrote: > shapes-ISSUE-178 (sh:message constraints): Should sh:message be permitted at constraints, too? [SHACL - Core] > > http://www.w3.org/2014/data-shapes/track/issues/178 > > Raised by: Holger Knublauch > On product: SHACL - Core > > 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. > > >
Received on Thursday, 22 September 2016 00:27:41 UTC