But you don't need to take it quite all the way:

<task name="javac" ... >
   <param name="compiler" value="..." />
   <classpath dir="..."/>
</task>    

Would be fine.  The 'classpath' element is a fairly common core construct.  
There is benefit in normalising the 'task' element  - which otherwise would 
have different names for different optionally installed tasks.  There is no 
such benefit in normalising the other bits and pieces.

True, you have to make your parameters elements too, since you don't know in 
advance the attributes that <task> may want to take.  However, this too as some 
appealing aspects.

For instance, multi-valued attributes are more neatly expressed in the text:

<param name="multivalued">
  <value>one</value>
  <value>two</value>
</param>


This would make the build.xml much more amenable to XSLT processing and to 
Simeon's goals, and even more humanly intelligible!


IMHO,
David.



On Mon, 29 Jan 2001, Simeon H.K. Fitch wrote:

> 
> 
> > -----Original Message-----
> > From: Peter Donald [mailto:[EMAIL PROTECTED]
> > Sent: Monday, January 29, 2001 8:46 PM
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: Info about Antidote
> >
> 
> > Consider the case
> >
> > <task name="javac" ... >
> >   <param name="compiler" value="..." />
> >   <param name="classpath">
> >     <param name="dir" value="..." />
> >   </param>
> > </task>
> >
> > VS
> >
> > <javac compiler="..." >
> >   <classpath dir="..." />
> > </javac>
> >
> > The first is much easier for computers and programmers while the second is
> > easier for mere mortals. We discussed the idea of using XSLT to transform
> > from approach 2 to approach 1 which was interesting but nothing
> > ever really
> > happened with it.
> >
> 
> Thanks for the update. Maybe internally Ant 2.0 could use the more type-safe
> approach (the first one), but allow the second scripy-way through such an
> XSLT transformation. Then again this may be overly complicated. It will be
> interesting 3 years from now if we will regret going one way or another....
> 
> 
> sim
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



David Bullock
LISAsoft Project Lead
Sun Certified Programmer for the Java 2 Platform 
 
 email: [EMAIL PROTECTED]
mobile: +61 4 0290 1228

"The key ingredients of success are a crystal-clear goal, 
a realistic attack plan to achieve that goal, 
and consistent, daily action to reach that goal."

Steve Maguire, "Debugging the Development Process". 

LISAsoft
http://www.lisasoft.com/

Adelaide                  Sydney
--------------------      ------------------------
38 Greenhill Rd           Level 3, 228 Pitt Street
Wayville S.A. 5034        Sydney NSW 2000
Australia                 Australia

PH  +61 8 8272 1555       PH  +61 2 9283 0877
FAX +61 8 8271 1199       FAX +61 2 9283 0866
--------------------      ------------------------

Reply via email to