Page 1 of 1

cannot find the declaration of the root-element

Posted: Wed Jul 13, 2005 2:29 pm
by schuster
hello,

when i try to validate my xml file against the schematron schema i get following validation error:
"cannot find the declaration of element '<root-element>'."

(see also the first validation error on page 3, figure 3 http://www.oxygenxml.com/doc/HowToSchematron.pdf)
what is the problem?

thanks,
b. schuster

Posted: Thu Jul 14, 2005 2:01 pm
by stefan
Usually, Schematron is not used as a replacement for the contending DTD, W3C XML schema and RELAX NG, but rather as a supplement to specify additional rules not expressable in the other languages (esp. complex and/or combinations of simple rules).

Oxygen likes to have a DTD, W3C Schema or Relax NG schema associated in order to validate the document. It actually does two parallel validation, one against the DTD,W3C XML or RelaxNG Schema and one against the Schematron schema (if associated using the processing instruction).

If your XML document only associates a Schematron Schema (without a DTD, W3C or RelaxNG schema) you will indeed get that error message.

If you like to validate against Schematron only, I advice you to use "Validate with" feature and to specify at Schematron tab your Schematron file.