Thanks for the push in the right direction. I ran into problems attaching it to MyClass using sh:node, but it worked properly by defining a shape and using sh:targetClass.
It kept the other constraint as a violation, and my new constraint as sh:Info. Steve On Thu, Jul 13, 2023 at 4:42 PM Holger Knublauch <[email protected]> wrote: > Have you tried attaching the sh:severity to the surrounding shape/class? > That should do it. If you don’t want to put it into the class itself, you > could create an in-between node shape and link it to the class using > sh:node. > > Holger > > > On 13 Jul 2023, at 9:33 pm, Steve Ray <[email protected]> wrote: > > I am successfully using sh:Info inside PropertyShapes with > SPARQLConstraints, but the particular constraint I'm working on is for any > property, so I am using a NodeShape. > > I have tried specifying sh:Info, but TBC-ME keeps showing my violating > SPARQLConstraint as a full-on violation rather than an sh:Info. > > Sample code pattern: > ex:MyClass > sh:sparql [ > a sh:SPARQLConstraint ; > sh:message "My message" ; > sh:severity sh:Info ; > sh:prefixes <http://relevantURI <http://relevanturi/>> ; > sh:select """ > SELECT $this ... > WHERE { > ... > """ ; > ] ; > > MyClass is defined elsewhere as a sh:NodeShape > MyClass has several SPARQLConstraints, so I want this one to be sh:Info > and the other one to be the default (sh:Violation). > > What am I doing wrong? > > Steve > > > > -- > The topics of this mailing list include TopBraid EDG and related > technologies such as SHACL. > To post to this group, send email to [email protected] > --- > You received this message because you are subscribed to the Google Groups > "TopBraid Suite Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/topbraid-users/CAGUep85YJy_CkvWGWcpfi9YeTMXCLrBuvrJbO8o-BkXJH7%2B18w%40mail.gmail.com > <https://groups.google.com/d/msgid/topbraid-users/CAGUep85YJy_CkvWGWcpfi9YeTMXCLrBuvrJbO8o-BkXJH7%2B18w%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > > -- > The topics of this mailing list include TopBraid EDG and related > technologies such as SHACL. > To post to this group, send email to [email protected] > --- > You received this message because you are subscribed to the Google Groups > "TopBraid Suite Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/topbraid-users/28CDEB5F-51C7-4C69-9580-F26965355028%40topquadrant.com > <https://groups.google.com/d/msgid/topbraid-users/28CDEB5F-51C7-4C69-9580-F26965355028%40topquadrant.com?utm_medium=email&utm_source=footer> > . > -- The topics of this mailing list include TopBraid EDG and related technologies such as SHACL. To post to this group, send email to [email protected] --- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/CAGUep87zdSmOogoBgotAbf3z87aV3trRXhXbr5NZyzXyf%2BS5%2Bw%40mail.gmail.com.
