You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Br...@maxateev.com on 2001/06/23 14:58:25 UTC

Schema Validation Problem

Hello

I am facing a problem. I am trying to validate a xml file against a schema
xsd file.

code is some thing like this -

>>>>

SAXParser parser = new SAXParser();

 parser.setErrorHandler (this);

 parser.setFeature("http://xml.org/sax/features/validation",true);

parser.setFeature ("http://apache.org/xml/features/validation/schema",
true);

parser.parse(xmlFile);

<<<<<

Error handler is defined in the same program.

When  i am running this program, it is thorwing error like -

>>>

Error:  org.xml.sax.SAXParseException: Element type "attribute" must be
declared.

Error:  org.xml.sax.SAXParseException: Attribute "name" must be declared
for element type "attribute".

<<<

And this type of error message is comming for every elemets and attributes
in xml file.

Can someone tell me the problem area.

Thanks in advance for any help


Brajendra Singh


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org