# ant-dev mailing list archives

##### Site index · List index
Message view
Top
Subject Bug? 1.6
Date Sun, 17 Aug 2003 18:47:55 GMT
```I suspect there is a bug in ResourceLocation.

I encounter the bug in XMLCatalog by running the xslt task with an xmlcatalog
sub-task. It occurs when trying to load a dtd from the local file system on
Windows. The bug does not occur under Linux/U**X - you'll see why below.

At around about line 675 in XMLCatalog:
url = new URL(baseURL, uri);

This thows due to the fact that the uri is not a well formed uri when running
under Windows. Further up the code:

private InputSource filesystemLookup(ResourceLocation matchingEntry) {

String uri = matchingEntry.getLocation();

getLocation under windows will return something like:

C:\top\of\tree/rest/of/path/for/the/dtd

The baseUrl would be something like:

file:/C:/basedir

getLocation (or another method?) needs to return

/C:\top\of\tree/rest/of/path/for/the/dtd <- which is a bit more like a valid
uri

I guess there are a couple of ways to fix this.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org