xml-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Earl Hood" <e...@earlhood.com>
Subject Suggested patches for resolver: Windows driver-letter paths and resolveSystem() and <uri>
Date Mon, 14 Apr 2008 23:00:01 GMT
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

Mime
View raw message