File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes schema validation with xerces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "schema validation with xerces" Watch "schema validation with xerces" New topic

schema validation with xerces

Eugene Yusim

Joined: Feb 13, 2004
Posts: 4
I am having a problem with schema validation using xerces 2.5.
I've got a main schema that includes (using xs:include) a 2nd schema which defines some types used in the main one. I set up an EntityResolver so both schemas are found by the parser.
I see the EntityResolver being called for both schemas and it opens up the correct file and creates and InputSource for the parser to use but the included schema is never used and I get errors saying that the types are not defined. If I paste the 2nd schema into the main one everything works.
I can even screw up the included schema to where it's not valid an xerces won't complain. It's like xerces completly ignores the included schema.
Is this just not supported by xerces or am I doing something wrong?
Eugene Yusim

Joined: Feb 13, 2004
Posts: 4
I realized I had an older version of xerces in my class path and this all works with 2.5.
I agree. Here's the link:
subject: schema validation with xerces
It's not a secret anymore!