ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Huditsch Roman" <Roman.Hudit...@lexisnexis.at>
Subject AW: AW: AW: Converting new or changed files with an batch file called from within ant
Date Tue, 12 Apr 2005 12:14:12 GMT
Hi James,

I tried to incorporate your suggestions, but I think I just made it to a certain extent....


	<target name="GLP_Legislation" description="Normen, Verordnungen, Staatsverträge,...">
		<!-- IS THAT CORRECT?? -->
		<uptodate property="xmlBuild.notRequired">
			<srcfiles dir= "source" includes="*.xml"/>
			<mapper type="merge" to="result/*.xml"/>
		</uptodate>
		<antCall target="pre_GLP_Legislation"/>
		<antCall target="process_GLP_Legislation"/>
		<antCall target="post_GLP_Legislation"/>
	</target>

	<target name="pre_GLP_Legislation" description="Creates all needed directories">
		<mkdir dir="added"/>
		...
		<mkdir dir="resolved"/>
		<mkdir dir="normalized"/>
	</target>

	<target name="process_GLP_Legislation" description="Do all XSLT transformations" depends="pre_GLP_Legislation"
if="xmlBuild.notRequired">
		<xslt basedir="source" destdir="added" style="stylesheets/add_information.xslt" classpath="net.sf.saxon.Transform"
processor="trax" extension=".xml" includes="*.xml" excludes="*/*.xml"/>
		...
		<xslt basedir="resolved" destdir="normalized" style="stylesheets/normalize_space.xslt"
classpath="net.sf.saxon.Transform" processor="trax" extension=".xml"/>
		<xslt basedir="normalized" destdir="result" style="stylesheets/convert_to_LNDE.xslt"
classpath="net.sf.saxon.Transform" processor="trax" extension=".xml"/>
	</target>

	<target name="post_GLP_Legislation" description="Delete unneeded directories" depends="process_GLP_Legislation">
		<delete dir="added"/>
		<delete dir="splitted"/>
		<delete dir="normalized"/>
	</target>


I wanted to make a starting target, which calls some sort of sub-targets (pre, process, post),
where process is dependant on "pre" and "post" on "process".
Is that correct so far?

The <uptodate> is making my go crazy...I don't get it to work in the way I want.....

I would like to transform just those files in "source" which have been altered in respect
to the "result" directory....
But the above statement is setting "xmlBuild.notRequired" if one file has been altered, which
would mean that all files are transformed again...

Or did I get something wrong? 

best regards,
Roman

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


Mime
View raw message