From 03302b660a12f5673cc7b3d750e80948064b82fb Mon Sep 17 00:00:00 2001 From: Diane Holt Date: Mon, 25 Mar 2002 20:21:11 +0000 Subject: [PATCH] Fix examples so they don't get filtered when we gen the release (PR #7450). Other minor edits. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272027 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/CoreTypes/filterset.html | 63 +++++++++++++++------------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/docs/manual/CoreTypes/filterset.html b/docs/manual/CoreTypes/filterset.html index 85d807b16..a4b3fc00c 100644 --- a/docs/manual/CoreTypes/filterset.html +++ b/docs/manual/CoreTypes/filterset.html @@ -6,14 +6,19 @@ -

Filterset

+

FilterSet

-

FilterSets are groups of filters. Filters can be defined as token value pairs +

FilterSets are groups of filters. Filters can be defined as token-value +pairs or be read in from a file. FilterSets can appear inside tasks that support this -feature or at the same level as target - i.e., as children of -project.

In addition, Filtersets can have begintoken and/or -endtoken attributes to define what to match.
Filtersets are used for doing -replacements in tasks like copy etc.
+feature or at the same level as <target> - i.e., as +children of +<project>.

+

In addition, FilterSets can specify +begintoken and/or +endtoken attributes to define what to match.

+

Filtersets are used for doing +replacements in tasks such as <copy>, etc.

Filterset

@@ -26,15 +31,15 @@ replacements in tasks like copy etc.
begintoken - The string marking the beginning of a token. eg - @Date@ + The string marking the beginning of a token (eg., + @date@). @ No endtoken - The string marking the end of a token. eg - @Date@ + The string marking the end of a token (eg., + @date@). @ No @@ -49,12 +54,13 @@ replacements in tasks like copy etc.
token - The token to replace eg @Date@ + The token to replace (eg., @date@) Yes value - The value to replace it with eg Thursday, April 26, 2001 + The value to replace it with + (eg., Thursday, April 26, 2001). Yes @@ -68,48 +74,49 @@ replacements in tasks like copy etc.
file - The file to load tokens from should be a properties file of - name value pairs. + A properties file of + name-value pairs from which to load the tokens. Yes

Examples

-

You are copying the version.txt file to the dist directory from the build directory -but wish to replace the token @DATE@ with todays date.

+

You are copying the version.txt file to the dist +directory from the build directory +but wish to replace the token @date@ with today's date.

-<copy file="${build.home}/version.txt" toFile="${dist.home}/version.txt">
+<copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">
   <filterset>
-    <filter token="DATE" value="${DATE}"/>
+    <filter token="date" value="${TODAY}"/>
   </filterset>
 </copy>
 
-

You are copying the version.txt file to the dist directory from the build directory -but wish to replace the token %DATE* with todays date.

+

You are copying the version.txt file to the dist +directory from the build directory +but wish to replace the token %date* with today's date.

-<copy file="${build.home}/version.txt" toFile="${dist.home}/version.txt">
+<copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">
   <filterset begintoken="%" endtoken="*">
-    <filter token="DATE" value="${DATE}"/>
+    <filter token="date" value="${TODAY}"/>
   </filterset>
 </copy>
 

Copy all the docs but change all dates and appropriate notices as stored in a file.

-<copy toDir="${dist.home}/docs" >
-  <fileset dir="${build.home}/docs">
+<copy toDir="${dist.dir}/docs" >
+  <fileset dir="${build.dir}/docs">
     <include name="**/*.html">
   </fileset>
   <filterset begintoken="%" endtoken="*">
-    <filter token="DATE" value="${DATE}"/>
-    <filtersfile file="${user.home}/dist.properties"/>
+    <filtersfile file="${user.dir}/dist.properties"/>
   </filterset>
 </copy>
 

-

Copyright © 2001 Apache Software Foundation. All rights -Reserved.

+

Copyright © 2001-2002 Apache Software Foundation. +All rights Reserved.