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:34:00 GMT
Peter Donald <> wrote:

>>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.
> I still think it would be better to seperate them out. Something
> like
> <script language="blah">
>   <classpath ref=".." />
>   <logic>
>    call myScriptTask();
>   </logic>
> </script>

I know this is the alternative and I could live with it. 

In the <sql> example it means the user would always have to specify
<transaction> explicitly, which might make him aware that there is an
transaction involved in the first place (which would be a good thing).

> and *perhaps* we could allow
> <script language="blah">
>    call myScriptTask();
> </script>

No, let's stick to one way.

> as a simplification in some cases much like with matchingTask vs
> Fileset.

When I modified MatchingTask I just included the shortcut for
backwards compatibility - I'm not fond of implicit filesets at all.

>>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.
> You can force order by just throwing a SAXException in the handler
> thats not a problem but that approach feels very unnatural to me.

Sure? AFAIK, it is not defined whether characters() will be invoked
once for all content or several times, that's why I'm not sure you'd
recognize whether content came before or after child elements.


View raw message