While working with xml-commons-resolver, I discovered that the code does not handle pathnames that utilize window's driver letters. The code appears to lose the "absoluteness" of the path, causing resolution of other entities/files to fail that have it for a base.
Also, and probably a little more controversal, is the resolution of system IDs. I noticed that resolverSystem() does not do a resolveURI() if no system mapping exists. This is a problem when using the <schemavalidate> task in Ant. I'm working with catalogs that contain numerous <uri> entries to remap http URLs to local file URLs. Unfortunately, Ant/Xerces fails to resolve to the local URLs because resolveSytem() is used (because the URLs appears in SYSTEM idenitifiers in the documents). The XML resolution spec is not clear if the resolver should also check <uri> entries or if the XML parser should do a URI lookup if a SYSTEM lookup fails (it appears Saxon may actually do this since it does not have the problem that Ant/Xerces does). To address the immediate problem, I checked resolveSystem() to call resolveURI() if it fails to find anything, and the change is in the Catalog.java.patch attached (but the patch also includes the Windows pathname fix also). Are any of these changes worth including in the resolver code base? --ewh
Catalog.java.patch
Description: Binary data
FileURL.java.patch
Description: Binary data