ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Use <xslt> in a filterchain?
Date Wed, 20 Sep 2006 05:53:42 GMT
>	Basically, I was doing something like this (if I 
>understand you correctly).  I was shunting the exec output to 
>a file and then using the <xslt> task to transform it into 
>another file.  I was just hoping to cut out the middleman.

My approach does not use a tmp file - it uses an Ant property.


0001: <exec resultproperty="out.xml" .../>
0002: <xslt out="..." style="...">
0003:     <resources>
0004:         <property name="out.xml"/>
0005:     </resources>
0006: </xslt> 


#1 catches the result (maybe you need 'outputproperty'...) of your
external program.
#2 xslt as usual: define the output file and the stylesheet
#3 here we use new features of Ant 1.7 - the resource collections (as
xml-input)
#4 and one resource is the value of an Ant property

But you have to ensure that the value of the property ${out.xml} is xml
compliant.
Otherwise you'll earn a BuildException...


Jan

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


Mime
View raw message