next up previous contents index
Next: Examples Up: Replace Previous: Parameters specified as nested   Contents   Index

Examples

<replace dir="${src}" value="wombat">
  <include name="**/*.html"/>
  <replacetoken><![CDATA[multi line
token]]></replacetoken>
</replace>
replaces occurrences of the string "multi line
ntoken" with the string "wombat", in all HTML files in the directory ${src}.Where
n is the platform specific line separator.
<replace file="${src}/index.html">
  <replacetoken><![CDATA[two line
token]]></replacetoken>
  <replacevalue><![CDATA[two line
token]]></replacevalue>
</replace>

replacefilter

In addition to allowing for multiple replacements, optional nested <replacefilter> elements allow replacement values to be extracted from a property file. The name of this file is specified using the <replace> attribute propertyFile.

token The string to search for. Yes
Attribute
value
property
The replacement string.
Name of the property whose value is to serve as the replacement value.
Either may be specified, but not both. Both can be omitted, if desired.

If neither value nor property is used, the value provided using the <replace> attribute value and/or the <replacevalue> element is used. If no value was specified using either of these options, the token is replaced with an empty string.


next up previous contents index
Next: Examples Up: Replace Previous: Parameters specified as nested   Contents   Index
Andrew Marlow 2003-07-08