ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Using files in classpath in task file=""
Date Thu, 03 Apr 2003 06:17:46 GMT
On Wed, 02 Apr 2003, Nicola Ken Barozzi <> wrote:

> If I had it in jars I could ship it automatically with the jar that
> has the task that generated index.xml, so I can easily do something
> like:
>   <xslt in="index.xml" out="index.html"
>         style="resource:/a/style.xsl"/>

I see.  What I don't see is how we could use an URI here without
breaking backwards compatibility.

In XSLTProcess we get the style parameter via setStyle(File), this
obviously cannot be called with anything else but a file object.  If
we wanted general URIs, we'd have to change the signature and break
custom tasks that inherit from or delegate to instances of
XSLTProcess.  No way.

I'd rather propose to add an alternative attribute styleURI or
something to XSLTProcess.

> Be able to specify a URL for every task that needs a file, and that
> thus uses the above fileutils method.

Again, not without changing the tasks to use something else, not File,
in their setter method and thus severely breaking backwards

> Or maybe KISS and just add a getStyleResource(String
> styleResource). It solves the immediate issue and doesn't open other
> potential problems.

Seems the better way to me - at least until we are prepared to break
API compatibility on almost all tasks at once 8-)


View raw message