You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by jh...@apache.org on 2013/05/03 09:03:44 UTC
svn commit: r1478660 - /ant/core/trunk/manual/Types/filterchain.html
Author: jhm
Date: Fri May 3 07:03:43 2013
New Revision: 1478660
URL: http://svn.apache.org/r1478660
Log:
Bug-53538: Manual requires clarification about the use of property/propertynames
Modified:
ant/core/trunk/manual/Types/filterchain.html
Modified: ant/core/trunk/manual/Types/filterchain.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/manual/Types/filterchain.html?rev=1478660&r1=1478659&r2=1478660&view=diff
==============================================================================
--- ant/core/trunk/manual/Types/filterchain.html (original)
+++ ant/core/trunk/manual/Types/filterchain.html Fri May 3 07:03:43 2013
@@ -585,9 +585,14 @@ user defined values.
<h4>Example:</h4>
This replaces occurrences of the string @DATE@ in the data
-with today's date and stores it in the property ${src.file.replaced}
+with today's date and stores it in the property ${src.file.replaced}.
<blockquote><pre>
<tstamp/>
+<!-- just for explaining the use of the properties -->
+<property name="src.file" value="orders.csv"/>
+<property name="src.file.replaced" value="orders.replaced"/>
+
+<!-- do the loading and filtering -->
<loadfile srcfile="${src.file}" property="${src.file.replaced}">
<filterchain>
<filterreader classname="org.apache.tools.ant.filters.ReplaceTokens">
@@ -595,6 +600,9 @@ with today's date and stores it in the p
</filterreader>
</filterchain>
</loadfile>
+
+<!-- just for explaining the use of the properties -->
+<echo message="${orders.replaced}"/>
</pre></blockquote>
Convenience method: