ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Re: ANT 1.7 features suggestion
Date Tue, 11 May 2004 23:03:52 GMT
Dominique Devienne wrote:

>>From: Alexey N. Solofnenko [mailto:A.Solofnenko@mdl.com]
>>
>>Actually <if> is too wordy. A mall <target if="XXX"> is translated into
>>
>>Complex conditions are big. A small expression language like "XXX &&
>>YYY" would be much nicer.
> 
> I so agree with you! That expression language could (should IMHO!) be XPath
> (JXpath or Jaxen are candidates, or the Xalan one?) where Ant properties
> would be available as XPath properties, and some of Ant's condition made
> into XPath functions.

The PropertyHelper aready does this in the embed proposal, since almost 
2 *years*. I had written the XMLDOM task for it, and that are also Jexl 
and Velocity versions.

http://cvs.apache.org/viewcvs.cgi/ant/proposal/embed/src/java/org/apache/tools/ant/taskdefs/
http://cvs.apache.org/viewcvs.cgi/ant/proposal/embed/src/java/org/apache/tools/ant/taskdefs/optional/

Examples from:
http://cvs.apache.org/viewcvs.cgi/ant/proposal/embed/test.xml?rev=1.9&only_with_tag=MAIN&view=markup

     <echo message="jexl /references/myJars:
             ${jexl:ant.references.myJars}" />

     <echo message="jxPath /targets[1]: ${jxpath:/targets[1]}" />
     <echo message="jxPath /references: ${jxpath:/references}" />
     <echo message="jxPath /references[@name='myJars']:
                      ${jxpath:/references[@name='myJars']}" />
     <echo message="jxPath /references/myJars:
                      ${jxpath:/references/myJars}" />
     <echo message="XMLDOM:
                  ${jxpath:/references/test.xml/root/project/@name}" />

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message