> But as you've got a broken DOCTYPE you have two options: > (1) use some parser-specific property setting to tell the parser to > ignore external DTDs. If you're using Sun's java 1.4 or later then the > underlying parser is actually Xerces, so see > http://xml.apache.org/xerces2-j/features.html > for feature external-parameter-entities > and see also method Digester.setProperty. Of course this isn't terribly > portable, nor guaranteed to work in future JVMs (though I can't see Sun > ditching Xerces for anything else in the near future). > > (2) write a custom EntityResolver subclass that returns an empty stream > when asked for the DTD, and register that with Digester using > Digester.setEntityResolver.
Forrest and others use the xml-resolver component from http://xml.apache.org/commons/components/resolver/index.html, which provides such an entity resolver that is able to map system identifiers to (different) urls. Have a look at the "XML Entity and URI Resolvers" article (http://xml.apache.org/commons/components/resolver/resolver-article.html) for a more in-depth explanation. Tom --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
