ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: specify xerces basedir?
Date Tue, 08 Nov 2005 20:38:37 GMT
On Tue, 8 Nov 2005, Dominique Devienne <> 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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message