cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ovidiu Predescu <>
Subject Re: [VOTE] Schematron validator in Anteater (andCocoonvalidatingTransformer)
Date Mon, 10 Jun 2002 06:40:19 GMT
On 6/9/02 11:17 PM, "Nicola Ken Barozzi" <> wrote:

> From: "Ovidiu Predescu" <>
> To: <>; <>
> Sent: Monday, June 10, 2002 4:14 AM
> Subject: Re: [VOTE] Schematron validator in Anteater
> (andCocoonvalidatingTransformer)
>> On 6/9/02 2:36 PM, "Nicola Ken Barozzi" <> wrote:
>>> From: "Ovidiu Predescu" <>
>>>> If you want to reuse functionality across multiple ant files, just
> define
>>>> the common functionality in targets in a common file, and call them
> using
>>>> the <ant> target.
>>> Which really slows down things sometimes and precludes the Ant
> dependency
>>> mechanism.
>> Why does it slow down things? Another build file should just parse and add
>> the targets to the pool of already existing targets. And since you're
>> calling the task directly, yes, you are avoiding the dependency mechanism,
>> but in this case this exactly what you want.
> I referred to "reuse functionality across multiple ant files".
> Since it's a generic statemement, I gave a generic answer ;-)


> <ant> is not the root of all evil, but shoudn't be used just to "call build
> functions", but call sub builds.

<ant> is the only way you can load and execute test scripts dynamically at
runtime. Even with an xinclude facility, it would be very difficult to load
arbitrary build files, since xinclude would be executed at parse time, while
<ant> is evaluated at runtime.

To understand what I mean, take a look at test/anteater/all-tests.xml in
Cocoon. The main target determines, at runtime, what are all the test files,
and executes them accordingly. I don't think this would be possible with an
xinclude target, since <xinclude> would have to refer to known URLs at parse

>>> I'm writing a simple xinclude system to patch Ant.
>>> Any suggestion on what to use to manage xinclude tags?
>> What would be the semantics of xinclude in the context of Ant? Suppose you
>> xinclude a target fragment inside the <project> element; this should
> create
>> a new target. But I imagine you could also xinclude a fragment inside a
>> target: this should only add whatever tasks are referred to that target.
>> If this is the semantics, then I'd say the xinclude element cannot be a
>> regular task. What you instead need is a special element which
> transparently
>> substitutes at _parse_ time XML fragments from other sources in the
> parsing
>> stream.
> I would make a XIncludeProjectHelper, so I would intervene in the parsing
> stage.
> What I would like to know, are there any separate xinclude implementations
> already?

I don't know, better ask on ant-dev about it. Also check the Sourceforge
Antcontrib project, they have a bunch of tasks which are not part of Ant.


To unsubscribe, e-mail:
For additional commands, email:

View raw message