commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <>
Subject Re: [Digester] How to turn off parse's attempt to retrieve dtd?
Date Wed, 15 Jun 2005 09:12:29 GMT
> 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
>   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, 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
for a more in-depth explanation.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message