ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hal" <hal.hildebr...@hellblazer.com>
Subject Re: Failing when including XML who's path has a space in it
Date Wed, 23 Jul 2003 02:05:52 GMT
The answer is the difference in Ant entity resolve code between:


    <!ENTITY inc SYSTEM "inc.xml">

and

    <!ENTITY inc SYSTEM "file:inc.xml">

The former prints out the error and succeeds.  The later works.

----- Original Message ----- 
From: "Hal" <hal.hildebrand@hellblazer.com>

> A bit more on this weirdness.  I found that the message seems to be bogus,
> and the lookup actually does happen.
>
> Here's two tests.  The first is run with xerces in ${ANT_HOME}/lib.  The
> second is run without.
>
> > ant
> Buildfile: build.xml
> c:\hal\work\tahiti\server\test\a%20test\inc.xml could not be found
>
> test:
>      [echo] foo
>
> BUILD SUCCESSFUL
> Total time: 1 second
>
> > ant
> Buildfile: build.xml
>
> test:
>      [echo] foo
>
> BUILD SUCCESSFUL
> Total time: 1 second
>
> Here is the build.xml:
>
> <?xml version="1.0"?>
> <!DOCTYPE project [
>     <!ENTITY inc SYSTEM "inc.xml">
> ]>
> <project name="bar" default="test" >
>     &inc;
> </project>
>
>
> Here is inc.xml:
>
> <target name="test" >
>     <echo message="foo" />
> </target>
>
> Note that the "test" target is in the included file.  So, obviously the
> include file had to be included to actually run the target, otherwise it
> would have barfed.
>
> Anyone have any ideas as to what could be causing this spurious message?
>
> This is very, very strange.
>
> ----- Original Message ----- 
> From: "Hal" <hal.hildebrand@hellblazer.com>
>
> > Figured it out.  It has something to do with the xerces parser I'm
using.
> >
> > Yi.
> >
> > ----- Original Message ----- 
> > From: "Hal" <hal.hildebrand@hellblazer.com>
> >
> > > Well, I spoke too soon.  Here is the version information:
> > >
> > >         Apache Ant version 1.5.3 compiled on July 22 2003
> > >         java version "1.4.2"
> > >         Java(TM) 2 Runtime Environment, Standard Edition (build
> 1.4.2-b28)
> > >         Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
> > >
> > > However, I still have any XML include path with spaces in it
transformed
> > > into %20's.
> > >
> > > What in the heck am I doing wrong?  Could it be something else
grubbing
> up
> > > the system?
> > >
> > > Any help would be greatly appreciated.  I'm at wit's end trying to
> figure
> > > this out.
> > >
> > > ----- Original Message ----- 
> > > From: "Hal" <hal.hildebrand@hellblazer.com>
> > >
> > > > Yep!  That was it.
> > > >
> > > > Many thanks.
> > > >
> > > > ----- Original Message ----- 
> > > > From: "Jacob Kjome" <hoju@visi.com>
> > > >
> > > > > What JDK are you using now and which one were you using then?  If
> > > JDK1.3.x
> > > > > then and 1.4.x now, see the following...
> > > > >
> > > > >
http://developer.java.sun.com/developer/bugParade/bugs/4466485.html
> > > > >
> > > > > Jake
> > > > >
> > > > > At 03:03 PM 7/14/2003 -0700, you wrote:
> > > > > >Okay, this used to work, but now doesn't....  I'm baffled and
was
> > > hoping
> > > > > >that someone on the list had run into this before.
> > > > > >
> > > > > >What happens is that I'm including some XML in a build.xml -
normal
> > > > > >enough.  Here's the definition:
> > > > > >   <?xml version="1.0"?>
> > > > > >   <!DOCTYPE project [
> > > > > >       <!ENTITY install SYSTEM "internal/install.xml">
> > > > > >   ]>
> > > > > >   <project name="installation" default="install">
> > > > > >       <!-- Include common install definitions -->
> > > > > >       &install;
> > > > > >Note that there are no "spaces" in the definition.  Rather the
> > "spaces"
> > > > > >are in the current path for this file - i.e. "c:\hal\test
> > > installation\".
> > > > > >
> > > > > >So when I run ant on this build file I get:
> > > > > >
> > > > > >C:\hal\test%20installation\internal\install.xml could not be
found
> > > > > >
> > > > > >Note the %20 translation of the space.
> > > > > >
> > > > > >So, what happened?  I was doing this a couple of months ago with
no
> > > > issues....
> > > > > >
> > > > > >Hopefully someone out there with more XML savvy than I has run
into
> > > this
> > > > > >issue and has a quick "Take the spoon out of the cup before
> drinking
> > > it"
> > > > > >kind of fix.
> > > > > >
> > > > > >Many thanks.
> > > > >
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > > > > For additional commands, e-mail: user-help@ant.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > > > For additional commands, e-mail: user-help@ant.apache.org
> > > >
> > > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


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


Mime
View raw message