On Tue, 8 Nov 2005, Dominique Devienne <[EMAIL PROTECTED]> wrote: >> > Does anyone know of a way to tell Xerces to use the legacy >> > script's base directory? >> >> Ant installs an EntityHandler that resolves relative file URIs >> relative to the basedir, but if your legacy build uses the wrong >> form of URI (i.e. it doesn't use file: at all), you are out of >> luck. > > But Stefan, relative XML entities are supposed to be relative to the > file that declares them, not relative to basedir, for that builds, > or its parent. Am I missing something?
You are correct, this is the code if (systemId.startsWith("file:")) { String path = FILE_UTILS.fromURI(systemId); File file = new File(path); if (!file.isAbsolute()) { file = FILE_UTILS.resolveFile(context.getBuildFileParent(), path); } so relative file: URIs get resolved relative to the build file, not relative to basedir. Thanks for correcting me. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]