Browse Source

Bug-53538: Manual requires clarification about the use of property/propertynames

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1478660 13f79535-47bb-0310-9956-ffa450edef68
master
Jan Materne 12 years ago
parent
commit
edbb09d862
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      manual/Types/filterchain.html

+ 9
- 1
manual/Types/filterchain.html View File

@@ -585,9 +585,14 @@ user defined values.
<h4>Example:</h4>

This replaces occurrences of the string &#64;DATE&#64; 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>
&lt;tstamp/&gt;
&lt;!-- just for explaining the use of the properties --&gt;
&lt;property name=&quot;src.file&quot; value=&quot;orders.csv&quot;/&gt;
&lt;property name=&quot;src.file.replaced&quot; value=&quot;orders.replaced&quot;/&gt;

&lt;!-- do the loading and filtering --&gt;
&lt;loadfile srcfile=&quot;${src.file}&quot; property=&quot;${src.file.replaced}&quot;&gt;
&lt;filterchain&gt;
&lt;filterreader classname=&quot;org.apache.tools.ant.filters.ReplaceTokens&quot;&gt;
@@ -595,6 +600,9 @@ with today's date and stores it in the property ${src.file.replaced}
&lt;/filterreader&gt;
&lt;/filterchain&gt;
&lt;/loadfile&gt;

&lt;!-- just for explaining the use of the properties --&gt;
&lt;echo message=&quot;${orders.replaced}&quot;/>
</pre></blockquote>

Convenience method:


Loading…
Cancel
Save