ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric van der Vlist <...@dyomedea.com>
Subject Re: Forcing dependencies
Date Thu, 21 Sep 2000 08:10:04 GMT
Stefan Bodewig wrote:
> 
> >>>>> "EvdV" == Eric van der Vlist <vdv@dyomedea.com> writes:
> 
>  EvdV> but I am wondering how I can force the dependencies of a
>  EvdV> target, using a style task, over additional XML files like I
>  EvdV> could force the dependencies over ".h" files included in a ".c"
>  EvdV> with a traditional make...
> 
> I'm afraid I don't understand this. Try to be patient and explain it
> to a child 8^).

In some cases, the list of dependencies is difficult to establish by a
program.

C files are an example with it's included .h files (you'd need to
proprocess the C source file to determine which included files are
used).

In the XML world, a XML document using external parsed entities, a XSLT
transformation accessing other source files than the one passed as a
parameter of the processor or including/importing other styelsheet are
other examples.

To work around this, in a makefile I can write:

result.cdf : general.cdf general.xml story2cdf.xsl
	xslt general.cdf story2cdf.xsl result.cdf

where general.cdf is my xml source file, story2cdf.xsl the
transformation, result.cdf the result of the transformation and
general.xml a XML document which I know is included as an external
entity within general.cdf.

The first line means that resulf.cdf depends on the 3 files general.cdf
general.xml and story2cdf.xsl.

The second one that to produce result.cdf, you need to run the command
"xslt general.cdf story2cdf.xsl result.cdf".

Make is clearly separating the dependencies between files and the
commands and the test of the modification dates is done out of (in fact
before) the commands.

Maybe out of a lack of knowklegde about Ant, I have the feeling that
this separation doesn't exist with Ant (a task such as "style" does it's
own testing of the modification dates) and that there is no standard way
of "forcing" the transformation of general.cdf if the file general.xml
which doesn't appear in the argument of the transformation has been
updated.

The only way I could think of would be to add a new parameter to the
style task which would give a list of files involved in the
transformation.

Since this issue can happen with many other tasks, I was wondering what
I may have missed and if there isn't any generic mecanism to achieve
this...

 >  EvdV> I have also a second question... looking into the XSLTProcess
>  EvdV> class, I can't find where the "hasXMLFileExtension" and
>  EvdV> "excluded" methods used at line 252 (Revision: 1.8) are defined
>  EvdV> !
> 
> Well line 252 is inside a comment. There is a whole bunch of unused
> code hidden by comments in this source file.

Shame on me ;) I'd be a very bad Java compiler!

Thanks

Eric
> 
> Stefan

-- 
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
------------------------------------------------------------------------

Mime
View raw message