ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craeg K Strong <>
Subject Re: if and unless attributes for all Tasks
Date Wed, 16 May 2001 23:23:17 GMT

Here is a thought:   We at Ariel Partners defined a grammar for 
expressing boolean logic in XML,
which we used for certain simple XSLT transformations, way long ago, 
completely unrelated to Ant.  
I thought I would share it with the list because we seem to currently be 
in a "share illustrative examples" mode...

Here are a few sample snippets:

       <SwitchName>OS Family</SwitchName>
        <Value>Email server</Value>
      <Value>Development host</Value>
       <Value>Web server</Value>
        <Value>Email server</Value>

Needless to say, our "When/And/Or/Not" elements perform a very similar 
function to that of Ant's "if" and "unless" attributes.  
Here are some of the potential advantages of the above type of approach:

- can easily use the boolean elements anywhere you like (project, task, 
target, ....)
- do not require everybody to add attributes to their elements [ adding 
if and unless attributes to every task? yikes! ]
- very easy to read and understand
- the DTD is extremely simple and regular

The intent of this example is merely to add another (hopefully relevant) 
data point to this discussion.   TIFWIW.


--Craeg Strong

Craeg K. Strong                               |
Ariel Partners LLC		              | 
85 River Street, Ste. 3A                      | Fax:      (781) 647-9690
Waltham, MA 02453                             | Voice:    (781) 647-2425

View raw message