ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Soesemann" <rsoesem...@sapient.com>
Subject foreach parameter does not change
Date Fri, 26 Nov 2004 15:45:45 GMT
Hello,

In my ant pipeline I have the following 2 targets which perform a
foreach on every xml file in a folder structure. I do it this way to
pass the path of the currently process file to the xsl transformer.
Although the code looks like $file is overwritten each iteration, all my
xmls get the same file parameter.

Any ideas?!

   <!-- ================ Target 8: AddUniqueId  ================ -->
    <target name="8_AddUniqueId" depends="6_AddSchemaDefinitions">
    	
    	<!-- Iterate over all xml files and include path as id via xslt
-->
    	<foreach target="8_sub" param="file" >
    		<path>
    			<fileset dir="${xs_dir}" includes="**/*.xml"/>
    		</path>
    	</foreach>
    </target>	
	
	<!-- Internal subtask call by foreach iterator in target 8 -->
	<target name="8_sub">
		<xslt in="${file}" 
			  basedir="${xs_dir}" 
			  destdir="${id_dir}"
			  style="add-unique-id.xsl"
			  extension=".xml">
			<param name="path" expression="${file}"/> <<----
IT NEVER CHANGES
		</xslt>
	</target>

Robert

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


Mime
View raw message