ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Content in tags
Date Fri, 08 Dec 2000 08:06:13 GMT
Peter Donald <> wrote:

> I think that any element that has sub-elements should not be able to
> also have content -

The only task I'm aware of that supports both content and child
elements is <sql>. It supports two child elements, transaction and

I see that something like this

  UPDATE ...

is a bad idea - the task will create an implicit transaction for the
"outer" statements, we could force users to always define that
implicit transaction themselves.

But the classpath child shows an area where allowing both, child
elements and content might be useful - say I wanted to add a classpath
child to script so that I can point the task to bsf.jar and don't need
to put it into ANT_HOME/lib or similar.

My first thought was to enforce order here - force the user to always
add the child elements first for example - but I realize that you
cannot constrain the order for elements with mixed content. You cannot
do that in a DTD but we could make that a rule in Ant, though I'm not
sure the XML parser would expose this to Ant.


View raw message