XMLEntityResolver's javadoc says: > /** > * Resolves an external parsed entity. If the entity cannot be > * resolved, this method should return null. > * > * @param resourceIdentifier: location of the XML resource to resolve > * > * @throws XNIException Thrown on general error. > * @throws IOException Thrown if resolved entity stream cannot be > * opened or some other i/o error occurs. > * @see org.apache.xerces.xni.XMLResourceIdentifier > */ > public XMLInputSource resolveEntity(XMLResourceIdentifier resourceIdentifier) > throws XNIException, IOException;
To me, it's not quite clear when the method can return null. In SAX EntityResolver, as you know, you can return null to have the caller do the default entity resolution. But with XMLEntityResolver, it's not clear if this is true. Looking at the way EntityResolverWrapper is implemented, it seems to believe that returning null will cause the caller to resolve the resource normally. However, with some other code like XMLSchemaLoader, this doesn't seem to be the case and returning null will actually cause the resolution to fail. Which of those two is the correct behavior? If the former is the case, is there any handy utility that can do the default resolution? In any case, I think people would be benefited by clarifying javadoc. regards, ---------------------- Kohsuke Kawaguchi E-Mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
