OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Zerces 1.4.2, JAXP, schema - can't validate


Has anyone been able to successfully perform a validating parse against a 
schema using  Xerces 1.4.2, the JAXP, and Java 1.3.1?

I've seen several posts regarding the subject that I have gone though, yet 
none seem to enable me to perform a validating parse on the sample 
documents that ship with Xerces: personal-schema.xml using personal.xsd (or 
any other docs/schemas, for that matter).

The following snippet is the code I am using, and no matter what I have 
tried I keep getting parse errors: "Element type "xxx" must be declared."

         Document doc = null;

         DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
         DocumentBuilder db = dbf.newDocumentBuilder();
         doc = db.parse(xmlFile);

My CLASSPATH contains only the Xerces jar and directory containing the 
class containing the above code.

Any and all help is greatly appreciated.

Thanks in advance,