Amedeo Farello wrote: > I would expect, from what I have understood about DTDs (which could not be > enough, I admit) that a validating parser should raise an exception indicating > the presence of a <name> element outside of a <content> element. Instead > Xerces > parses such a file without problems.
You must register an ErrorHandler with the parser or else the errors will be silently ignored. Write a class that implements the org.xml.sax.ErrorHandler interface and then register it with the parser by calling setErrorHandler. This is the default behavior in Xerces 1.x. However, In Xerces2, we register an error handler by default that prints the error messages to the standard output so that people will always see the errors even if they forget to register their own error handler. -- Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
