Rectangle 27 0

java SAXParseException : Cannot find the declaration of element 'definitions'?


Cannot find the declaration of element 'definitions'

It did find the XML but its content does not match what is expected.

Sorry, but I didnot get your answer.Do you mean it didnot find the xml file in resource folder?

This error means that reading your XML file (which one ?), there is no definitions tag whereas a schema stipulates there should be one.

Note
Rectangle 27 0

java SAXParseException : Cannot find the declaration of element 'definitions'?


InputStream inputStream = DishDecider.class.getResourceAsStream("/dish-decision.dmn11.xml");
http://www.omg.org/spec/DMN/20151101/dmn11.xsd

In your example you use the Spring ImportResource annotation which is used to import bean definitions. That is why Spring tries to validate the DMN XML file you specified and correctly fails as it isn't in the correct format. Remove this line.

The XSD is only validated by the Camunda DMN Model API which has the XSD as a resource. The one I linked in a previous comment.

one doubt, I am not good in xml but just curious if I brows xsd url for dmn in browser it does not work. Then how it gets xsd to validate xml?

Note