Chris Burdess wrote:
> Gary Benson wrote:
> > This commit fixes a bug where the entity resolver (if set) would
> > be used to open the top-level document when parsing an XML file.
> > The spec states that the parser will use the entity resolver
> > before opening any external entity _except_ the top-level document
> > entity.
> 
> I'm not sure which spec says that. The EntityResolver class
> documentation says:
> 
> "The application can also use this interface to redirect system
> identifiers to local URIs or to look up replacements in a catalog
> (possibly by using the public identifier)."

Check the second paragraph of resolveEntity()'s description:

  "The parser will call this method before opening any external
   entity except the top-level document entity."

I put a printf into the testcase's resolveEntity() and I can confirm
that it is not called on IBM.

Cheers,
Gary

Reply via email to