cannot find the declaration of the root-element

This should cover W3C XML Schema, Relax NG and DTD related problems.
schuster
Posts: 1
Joined: Wed Jul 13, 2005 1:36 pm

cannot find the declaration of the root-element

Post by schuster » Wed Jul 13, 2005 2:29 pm

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

stefan
Posts: 45
Joined: Wed Jan 08, 2003 9:43 am
Contact:

Post by stefan » Thu Jul 14, 2005 2:01 pm

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.

Post Reply