I went from using xerces that ships as part of JDK 5 to Xerces 2.6.2. I parse using a validating parser, setting my own entity resolver.
With JDK 5, this entity resolver would get invoked if a document without a DOCTYPE declaration was encountered. With Xerces 2.6.2, I get a SAXException. It says it enountered (my document's) root element when it was expecting 'null'. My current (ugly) hack is to modify org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement() to call doctypeDecl() with the specs of *my* DTD. This simulates a DOCTYPE declaration and seems to do the trick. Does anyone know of a way to make xerces 2.6.2 go to the entity resolver if DOCTYPE is missing? Thanks. -Raj --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]