MikiDi opened a new issue, #3817: URL: https://github.com/apache/jena/issues/3817
### Version 6.0.0 ### Question When parsing a `sh:SPARQLConstraint` that has multiple definitions of `sh:message`, Jena SHACL validator throws following error: ``` org.apache.jena.shacl.parser.ShaclParseException: More than one match : (<http://example.com#my-sparql-shape> <http://www.w3.org/ns/shacl#message> ANY) at org.apache.jena.shacl.parser.ShapesParser.parseShapeStep(ShapesParser.java:320) at org.apache.jena.shacl.parser.ShapesParser.parseShape(ShapesParser.java:246) at org.apache.jena.shacl.parser.ShapesParser.parseShapeAcc(ShapesParser.java:231) at org.apache.jena.shacl.parser.ShapesParser.parseShapes(ShapesParser.java:173) at org.apache.jena.shacl.parser.ShapesParser.parseProcess(ShapesParser.java:102) at org.apache.jena.shacl.Shapes.parseProcess(Shapes.java:107) at org.apache.jena.shacl.Shapes.parseAll(Shapes.java:102) at org.apache.jena.shacl.Shapes.parse(Shapes.java:90) at org.apache.jena.shacl.validation.ShaclPlainValidator.parse(ShaclPlainValidator.java:41) at org.apache.jena.shacl.validation.ShaclPlainValidator.validate(ShaclPlainValidator.java:93) at shacl.shacl_validate.exec(shacl_validate.java:130) at org.apache.jena.cmd.CmdMain.mainMethod(CmdMain.java:98) at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:64) at org.apache.jena.cmd.CmdMain.mainRun(CmdMain.java:52) at shacl.shacl_validate.main(shacl_validate.java:64) at shacl.shacl.main(shacl.java:78) ``` The [SHACL spec on sh:SPARQLConstraint](https://www.w3.org/TR/shacl/#dfn-sparql-based-constraints) however seems to suggest that multiple values for `sh:message` are allowed: > [SPARQL-based constraints](https://www.w3.org/TR/shacl/#dfn-sparql-based-constraints) may have values for the property sh:message and these are either xsd:string literals or literals with a language tag. [SPARQL-based constraints](https://www.w3.org/TR/shacl/#dfn-sparql-based-constraints) may have at most one value for the property sh:deactivated and this value is either true or false. Although the implementation choice made in Jena SHACL looks logical to me, a parser *warning* regarding the multiple `sh:message`'s would be closer to the spec imo. Please provide your feedback. thanks beforehand, -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
