Alex is exactly right, of course. I was able to get schema support out of Xerces using the JAXP API, as he recommended.
However, I did finally figure out how to get schema support out of the Xerces API without using JAXP. There are four features that must be set to true: http://apache.org/xml/features/dom/defer-node-expansion http://xml.org/sax/features/validation http://xml.org/sax/features/namespaces http://apache.org/xml/features/validation/schema I mistakenly thought that "../validation" was enough. I finally realized that I also needed "../validation/schema". You also need to write an ErrorHandler to report warnings, errors, and fatal errors. Now you have your choice: JAXP or not. I guess the advantage would be that using JAXP will allow you to change parsers without changing your code. Thanks to everyone who responded to this question. - MOD --- Edwin Goei <[EMAIL PROTECTED]> wrote: > Alex Neth wrote: > > > > I don't use the DOMParser class. What is the > purpose of this class? > > I use the following method to parse the document: > > > > DocumentBuilderFactory docFactory = > > DocumentBuilderFactory.newInstance(); > > As someone else mentioned (Ian Roberts) on this > thread, JAXP is an XML > processor independent API. It is implemented as a > wrapper around the > Xerces DOMParser class. I recently checked in code > to the Xerces JAXP > implementation to make it conform to the JAXP 1.1 > spec recently so it > may not have made it into an official package. So > you may be using > older code and may want to try using the latest code > from the CVS > repository. > > -Edwin > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
