You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Adrian Blakey <aj...@blakey.org> on 2003/08/17 20:47:55 UTC

Bug? 1.6

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
For additional commands, e-mail: dev-help@ant.apache.org


Re: Bug? 1.6

Posted by Antoine Levy-Lambert <an...@antbuild.com>.
Adrian, can you open a bug report on
http://nagoya.apache.org/bugzilla
concerning your problem.
Thanks in advance
Antoine
----- Original Message -----
From: "Adrian Blakey" <aj...@blakey.org>
To: <de...@ant.apache.org>
Sent: Sunday, August 17, 2003 8:47 PM
Subject: Bug? 1.6


> 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
> For additional commands, e-mail: dev-help@ant.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org