Browse Source

PR: 10728

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273098 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 23 years ago
parent
commit
0dd749e0a9
2 changed files with 8 additions and 9 deletions
  1. +1
    -1
      docs/manual/CoreTypes/filterchain.html
  2. +7
    -8
      docs/manual/CoreTypes/filterset.html

+ 1
- 1
docs/manual/CoreTypes/filterchain.html View File

@@ -379,7 +379,7 @@ user defined values.

<H4>Example:</H4>

This replaces occurences of the string @DATE@ in the data
This replaces occurences of the string &#64;DATE&#64; in the data
with today's date and stores it in the property ${src.file.replaced}
<BLOCKQUOTE><PRE>
&lt;tstamp/&gt;


+ 7
- 8
docs/manual/CoreTypes/filterset.html View File

@@ -19,7 +19,6 @@ children of
<code>endtoken</code> attributes to define what to match.</p>
<p>Filtersets are used for doing
replacements in tasks such as <code>&lt;copy&gt;</code>, etc.</p>
<p>Nested filters are possible and a message will be given in case a value in a filter chain is called for a second time and thus causing an infinite loop. The originating token will be passed back when an infinite loop occurs.

<H2>Filterset</H2>

@@ -33,14 +32,14 @@ replacements in tasks such as <code>&lt;copy&gt;</code>, etc.</p>
<TR>
<TD vAlign=top>begintoken</TD>
<TD vAlign=top>The string marking the beginning of a token (eg.,
<code>@date@</code>).</TD>
<code>&#64;DATE&#64;</code>).</TD>
<TD vAlign=top>@</TD>
<TD vAlign=top align="center">No</TD>
</TR>
<TR>
<TD vAlign=top>endtoken</TD>
<TD vAlign=top>The string marking the end of a token (eg.,
<code>@date@</code>).</TD>
<code>&#64;DATE&#64;</code>).</TD>
<TD vAlign=top>@</TD>
<TD vAlign=top align="center">No</TD>
</TR>
@@ -55,7 +54,7 @@ replacements in tasks such as <code>&lt;copy&gt;</code>, etc.</p>
</TR>
<TR>
<TD vAlign=top>token</TD>
<TD vAlign=top>The token to replace (eg., <code>@date@</code>)</TD>
<TD vAlign=top>The token to replace (eg., <code>&#64;DATE&#64;</code>)</TD>
<TD vAlign=top align="center">Yes</TD>
</TR>
<TR>
@@ -85,22 +84,22 @@ replacements in tasks such as <code>&lt;copy&gt;</code>, etc.</p>

<p>You are copying the <code>version.txt</code> file to the <code>dist</code>
directory from the <code>build</code> directory
but wish to replace the token <code>@date@</code> with today's date.</p>
but wish to replace the token <code>&#64;DATE&#64;</code> with today's date.</p>
<BLOCKQUOTE><PRE>
&lt;copy file=&quot;${build.dir}/version.txt&quot; toFile=&quot;${dist.dir}/version.txt&quot;&gt;
&lt;filterset&gt;
&lt;filter token=&quot;date&quot; value=&quot;${TODAY}&quot;/&gt;
&lt;filter token=&quot;DATE&quot; value=&quot;${TODAY}&quot;/&gt;
&lt;/filterset&gt;
&lt;/copy&gt;
</PRE></BLOCKQUOTE>

<p>You are copying the <code>version.txt</code> file to the <code>dist</code>
directory from the build directory
but wish to replace the token <code>%date*</code> with today's date.</p>
but wish to replace the token <code>%DATE*</code> with today's date.</p>
<BLOCKQUOTE><PRE>
&lt;copy file=&quot;${build.dir}/version.txt&quot; toFile=&quot;${dist.dir}/version.txt&quot;&gt;
&lt;filterset begintoken=&quot;%&quot; endtoken=&quot;*&quot;&gt;
&lt;filter token=&quot;date&quot; value=&quot;${TODAY}&quot;/&gt;
&lt;filter token=&quot;DATE&quot; value=&quot;${TODAY}&quot;/&gt;
&lt;/filterset&gt;
&lt;/copy&gt;
</PRE></BLOCKQUOTE>


Loading…
Cancel
Save