1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<!-- Documenting T:NAnt.Core.Filters.ReplaceTokens-->
5
<meta http-equiv="Content-Language" content="en-ca" />
6
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
<link rel="stylesheet" type="text/css" href="../style.css" />
8
<title><replacetokens> Filter</title>
11
<table width="100%" border="0" cellspacing="0" cellpadding="2" class="NavBar">
13
<td class="NavBar-Cell">
14
<a href="http://nant.sourceforge.net">
17
<img alt="->" src="../images/arrow.gif" />
18
<a href="../index.html">Help</a>
19
<img alt="->" src="../images/arrow.gif" />
20
<a href="../filters/index.html">Filter Reference</a>
21
<img alt="->" src="../images/arrow.gif" /> <replacetokens></td>
22
<td class="NavBar-Cell" align="right">
26
<h1><replacetokens></h1>
27
<p> Replaces tokens in the original input with user-supplied values. </p>
28
<p> This filter replaces all token surrounded by a beginning and ending token. The default beginning and ending tokens both default to '@'. The optional <code>begintoken</code> and <code>endtoken</code> attributes can be specified to change either token. By default string comparisons are case sensitive but this can be changed by setting the optional <code>ignorecase</code> attribute to <b>true</b>. </p>
29
<p> Tokens are specified by using the <a href="../elements/NAnt.Core.Types.Token.html">Token</a> element. It is possible to specify from 1 to n tokens and replacement values. Values can be any valid NAnt expression. </p>
30
<p> Filters are intended to be used as a element of a <a href="../types/filterchain.html"><filterchain></a>. </p>
36
<th style="text-align: center;">Type</th>
38
<th style="text-align: center;">Required</th>
41
<td valign="top">begintoken</td>
42
<td style="text-align: center;">char</td>
43
<td> Marks the beginning of a token. The default is "@". </td>
44
<td style="text-align: center;">False</td>
47
<td valign="top">endtoken</td>
48
<td style="text-align: center;">char</td>
49
<td> Marks the end of a token. The default is "@". </td>
50
<td style="text-align: center;">False</td>
53
<td valign="top">ignorecase</td>
54
<td style="text-align: center;">bool</td>
55
<td> Determines if case will be ignored. The default is <b>false</b>. </td>
56
<td style="text-align: center;">False</td>
59
<td valign="top">if</td>
60
<td style="text-align: center;">bool</td>
61
<td> If <b>true</b> then the filter will be used; otherwise, skipped. The default is <b>true</b>. </td>
62
<td style="text-align: center;">False</td>
65
<td valign="top">unless</td>
66
<td style="text-align: center;">bool</td>
67
<td> Opposite of <code>if</code>. If <b>false</b> then the filter will be executed; otherwise, skipped. The default is <b>false</b>. </td>
68
<td style="text-align: center;">False</td>
72
<h3>Nested Elements:</h3>
74
<!--NestedElementArray=T:NAnt.Core.Types.Token-->
80
<div class="nested-element"> Tokens and replacement values. <p> ReplaceTokens filter token. </p><h3>Parameters</h3><div class="table"><table><tr><th>Attribute</th><th style="text-align: center;">Type</th><th>Description</th><th style="text-align: center;">Required</th></tr><tr><td valign="top" class="required">key</td><td style="text-align: center;">string</td><td> Token to be replaced. </td><td style="text-align: center;">True</td></tr><tr><td valign="top" class="required">value</td><td style="text-align: center;">string</td><td> New value of token. </td><td style="text-align: center;">True</td></tr><tr><td valign="top">if</td><td style="text-align: center;">bool</td><td> Indicates if the token should be used to replace values. If <b>true</b> then the token will be used; otherwise, not. The default is <b>true</b>. </td><td style="text-align: center;">False</td></tr><tr><td valign="top">unless</td><td style="text-align: center;">bool</td><td> Indicates if the token should not be used to replace values. If <b>false</b> then the token will be used; otherwise, not. The default is <b>false</b>. </td><td style="text-align: center;">False</td></tr></table></div></div>
89
<p> Replace all occurrences of the string @DATE@ with the value of property "TODAY". </p>
92
<token key="DATE" value="${TODAY}" />
93
</replacetokens>
97
<p> Replace all occurrences of the string <DATE> with the value of property "TODAY". </p>
99
<replacetokens begintoken="&lt;" endtoken="&gt;">
100
<token key="DATE" value="${TODAY}" />
101
</replacetokens>
105
<h3>Requirements</h3>
106
<div style="margin-left: 20px;">
107
<b>Assembly:</b> NAnt.Core (0.90.3780.0)
b'\\ No newline at end of file'