This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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.
subject: schema validation with xerces
Similar Threads
Schema validation with Xerces 1.4
xerces : Parsingproblem when "include" one or more Schema in another
using Schema
Using schema files in a jar
SAX parse and validate with XSD