ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: [PATCH] Fixes for <xmlvalidate>
Date Tue, 08 May 2001 09:28:52 GMT
This patch uses File.toURL(), which makes it dependent on JDK 1.2+,
followed by URL.toExternalForm().  The current task can be used in JDK
1.1.

Any reason we should not use something like this (taken from
ProjectHelper)

String uri = "file:" + buildFile.getAbsolutePath().replace('\\', '/');
for (int index = uri.indexOf('#'); index != -1; index = uri.indexOf('#')) {
    uri = uri.substring(0, index) + "%23" + uri.substring(index+1);
}

Stefan

Mime
View raw message