ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Agnew <br...@oopsconsultancy.com>
Subject Re: "Expanding" XML attributes with ant 1.6.5
Date Wed, 18 Mar 2009 11:08:43 GMT
If I understand this correctly, then the seed XML is a 'meta' build.xml. 
If that's the case, then XMLTask may be able to help. It can iterate 
over an XML file (of whatever form) and call Ant targets based on the 
content/structure of that file.

See http://www.oopsconsultancy.com/software/xmltask, and in particular 
the <call> instruction.

On 17/3/09 21:27, Scot P. Floess wrote:
>
> Sorry, I am still a little confused...
>
> Are you defing some XML that contains what want to call and using this 
> as seed data in the transform to generate the Ant script?
>
> Honestly, I'm not understanding...sorry :(
>
> If you are using it as seed data...can you simply define a macrodef 
> who has an <element> element you can use to replace inline?
>
>
>
> On Tue, 17 Mar 2009, Francis Galiegue wrote:
>
>> On mardi 17 mars 2009 17:37:05 Scot P. Floess wrote:
>>> Sorry, I am a little confused...  If I understand you, you define the
>>> includes as attributes and use XSLT to generate what type of Ant file?
>>>
>>
>> An ant file that calls others. The task is :
>>
>> <target name="genbuild" depends="init">
>> <xslt force="yes" style="real-build.xsl" in="dist.xml"
>>                out="real-build.xml"/>
>> </target>
>>
>> Here's an extract from the stylesheet:
>>
>> ----
>> <target name="download" unless="nocvs">
>> <xsl:for-each select="dist/module">
>> <xsl:variable name="module" select="@name"/>
>> <ant antfile="step2-download.xml">
>> <property name="module">
>> <xsl:attribute name="value">
>> <xsl:value-of select="$module"/>
>> </xsl:attribute>
>> </property>
>> </ant>
>> </xsl:for-each>
>> </target>
>> ----
>>
>> But I'd rather not use an XSL stylesheet at all. I really, really 
>> hate XSL.
>> Unfortunately, I don't see any other way to do it for now.
>>
>> -- 
>> Francis Galiegue
>> ONE2TEAM
>> Ingénieur système
>> Mob : +33 (0) 6 83 87 78 75
>> Tel : +33 (0) 1 78 94 55 52
>> fge@one2team.com
>> 40 avenue Raymond Poincaré
>> 75116 Paris
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>
> Scot P. Floess
> 27 Lake Royale
> Louisburg, NC  27549
>
> 252-478-8087 (Home)
> 919-754-4592 (Work)
>
> Chief Architect JPlate   http://sourceforge.net/projects/jplate
> Chief Architect JavaPIM  http://sourceforge.net/projects/javapim
>
> Architect Keros          http://sourceforge.net/projects/keros
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org

-- 
Brian Agnew                  http://www.oopsconsultancy.com
OOPS Consultancy Ltd
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message