Debian Codegraph @

docs/manual/tasks/more_conditions.html

raw symbols SCIP
1 <html>
2 <head>
3 <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4 <title>
5 More Conditions</title>
6 <meta content="DocBook XSL Stylesheets V1.60.1" name="generator">
7 <link rel="home" href="index.html" title="Antelope Users Guide">
8 <link rel="up" href="bk03ch05.html" title="Chapter&nbsp;5.&nbsp;If Task">
9 <link rel="previous" href="bk03ch05.html" title="Chapter&nbsp;5.&nbsp;If Task">
10 <link rel="next" href="bk03ch06.html" title="Chapter&nbsp;6.&nbsp;SwitchTask">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <div class="section" lang="en">
14 <div class="titlepage">
15 <div>
16 <div>
17 <h2 class="title" style="clear: both">
18 <a name="conditionals">
19 </a>
20 More Conditions</h2>
21 </div>
22 </div>
23 <div>
24 </div>
25 </div>
26 <p>
27
28 These conditions are suitable for use in the &lt;bool&gt; element. Unfortunately, they cannot be used in the &lt;condition&gt; task, although all conditions for the &lt;condition&gt; task can be used with the &lt;bool&gt; and the &lt;bool&gt; can be used anywhere that &lt;condition&gt; can be used.
29 </p>
30 <h4>
31 <a name="N10708">
32 </a>
33 IfPropertyTrue</h4>
34 <p>
35
36 Given a property name, tests whether the value for that property equals "true" (or "yes" or "on").
37 </p>
38 <p>
39
40 <div class="table">
41 <a name="N1070F">
42 </a>
43 <p class="title">
44 <b>
45 Table&nbsp;5.2.&nbsp;IfPropertyTrue Attributes</b>
46 </p>
47 <table summary="IfPropertyTrue Attributes" border="1">
48 <colgroup>
49 <col>
50 <col>
51 <col>
52 </colgroup>
53 <thead>
54 <tr>
55 <th>
56 Attribute</th>
57 <th>
58 Description</th>
59 <th>
60 Required</th>
61 </tr>
62 </thead>
63 <tbody>
64 <tr>
65 <td>
66 property</td>
67 <td>
68 The name of a property to test the value of.</td>
69 <td>
70 Yes</td>
71 </tr>
72 </tbody>
73 </table>
74 </div>
75
76 </p>
77 <p>
78
79 <table border="0" bgcolor="#E0E0E0">
80 <tr>
81 <td>
82 <pre class="programlisting">
83
84
85 &lt;ispropertytrue property="myprop"/&gt;
86 &lt;ispropertytrue property="${someprop}"/&gt;
87
88 </pre>
89 </td>
90 </tr>
91 </table>
92
93 </p>
94 <h4>
95 <a name="N1072C">
96 </a>
97 IfPropertyFalse</h4>
98 <p>
99
100 Given a property name, tests whether the value for that property equals "false" (or "no" or "off").
101 </p>
102 <p>
103
104 <div class="table">
105 <a name="N10733">
106 </a>
107 <p class="title">
108 <b>
109 Table&nbsp;5.3.&nbsp;IfPropertyFalse Attributes</b>
110 </p>
111 <table summary="IfPropertyFalse Attributes" border="1">
112 <colgroup>
113 <col>
114 <col>
115 <col>
116 </colgroup>
117 <thead>
118 <tr>
119 <th>
120 Attribute</th>
121 <th>
122 Description</th>
123 <th>
124 Required</th>
125 </tr>
126 </thead>
127 <tbody>
128 <tr>
129 <td>
130 property</td>
131 <td>
132 The name of a property to test the value of.</td>
133 <td>
134 Yes</td>
135 </tr>
136 </tbody>
137 </table>
138 </div>
139
140 </p>
141 <p>
142
143 <table border="0" bgcolor="#E0E0E0">
144 <tr>
145 <td>
146 <pre class="programlisting">
147
148
149 &lt;ispropertyfalse property="myprop"/&gt;
150 &lt;ispropertyfalse property="${someprop}"/&gt;
151
152 </pre>
153 </td>
154 </tr>
155 </table>
156
157 </p>
158 <h4>
159 <a name="N10750">
160 </a>
161 StartsWith</h4>
162 <p>
163
164 Given a property name, tests whether the value for that property starts with a specified string.
165 </p>
166 <p>
167
168 <div class="table">
169 <a name="N10757">
170 </a>
171 <p class="title">
172 <b>
173 Table&nbsp;5.4.&nbsp;StartsWith Attributes</b>
174 </p>
175 <table summary="StartsWith Attributes" border="1">
176 <colgroup>
177 <col>
178 <col>
179 <col>
180 </colgroup>
181 <thead>
182 <tr>
183 <th>
184 Attribute</th>
185 <th>
186 Description</th>
187 <th>
188 Required</th>
189 </tr>
190 </thead>
191 <tbody>
192 <tr>
193 <td>
194 string</td>
195 <td>
196 The string to test.</td>
197 <td>
198 Yes</td>
199 </tr>
200 <tr>
201 <td>
202 with</td>
203 <td>
204 Check if 'string' starts with this value.</td>
205 <td>
206 Yes</td>
207 </tr>
208 </tbody>
209 </table>
210 </div>
211
212 </p>
213 <p>
214
215 <table border="0" bgcolor="#E0E0E0">
216 <tr>
217 <td>
218 <pre class="programlisting">
219
220
221 &lt;startswith string="abcdefg" with="abc"/&gt;
222 &lt;startswith string="${myprop}" with="foo"/&gt;
223
224 </pre>
225 </td>
226 </tr>
227 </table>
228
229 </p>
230 <h4>
231 <a name="N1077B">
232 </a>
233 EndsWith</h4>
234 <p>
235
236 Given a property name, tests whether the value for that ends with with a specified string.
237 </p>
238 <p>
239
240 <div class="table">
241 <a name="N10782">
242 </a>
243 <p class="title">
244 <b>
245 Table&nbsp;5.5.&nbsp;EndsWith Attributes</b>
246 </p>
247 <table summary="EndsWith Attributes" border="1">
248 <colgroup>
249 <col>
250 <col>
251 <col>
252 </colgroup>
253 <thead>
254 <tr>
255 <th>
256 Attribute</th>
257 <th>
258 Description</th>
259 <th>
260 Required</th>
261 </tr>
262 </thead>
263 <tbody>
264 <tr>
265 <td>
266 string</td>
267 <td>
268 The string to test.</td>
269 <td>
270 Yes</td>
271 </tr>
272 <tr>
273 <td>
274 with</td>
275 <td>
276 Check if 'string' ends with this value.</td>
277 <td>
278 Yes</td>
279 </tr>
280 </tbody>
281 </table>
282 </div>
283
284 </p>
285 <p>
286
287 <table border="0" bgcolor="#E0E0E0">
288 <tr>
289 <td>
290 <pre class="programlisting">
291
292
293 &lt;endswith string="abcdefg" with="efg"/&gt;
294 &lt;endswith string="${myprop}" with="bar"/&gt;
295
296 </pre>
297 </td>
298 </tr>
299 </table>
300
301 </p>
302 <h4>
303 <a name="N107A6">
304 </a>
305 IsGreaterThan</h4>
306 <p>
307
308 Tests whether the first argument is greater than the second argument. Will
309 automatically treat the arguments as numbers if both arguments consists of only the characters 0 through 9 and optionally a decimal point. Otherwise, a String
310 comparison is used.
311 </p>
312 <p>
313
314 <div class="table">
315 <a name="N107AD">
316 </a>
317 <p class="title">
318 <b>
319 Table&nbsp;5.6.&nbsp;IsGreaterThan Attributes</b>
320 </p>
321 <table summary="IsGreaterThan Attributes" border="1">
322 <colgroup>
323 <col>
324 <col>
325 <col>
326 </colgroup>
327 <thead>
328 <tr>
329 <th>
330 Attribute</th>
331 <th>
332 Description</th>
333 <th>
334 Required</th>
335 </tr>
336 </thead>
337 <tbody>
338 <tr>
339 <td>
340 arg1</td>
341 <td>
342 The first argument.</td>
343 <td>
344 Yes</td>
345 </tr>
346 <tr>
347 <td>
348 arg2</td>
349 <td>
350 The second argument.</td>
351 <td>
352 Yes</td>
353 </tr>
354 </tbody>
355 </table>
356 </div>
357
358 </p>
359 <p>
360
361 <table border="0" bgcolor="#E0E0E0">
362 <tr>
363 <td>
364 <pre class="programlisting">
365
366
367 &lt;!-- evaluates to true --&gt;
368 &lt;isgreaterthan arg1="6.02" arg2="4"/&gt;
369
370 &lt;!-- evaluates to false --&gt;
371 &lt;isgreaterthan arg1="bar" arg2="foo"/&gt;
372
373 </pre>
374 </td>
375 </tr>
376 </table>
377
378 </p>
379 <h4>
380 <a name="N107D1">
381 </a>
382 IsLessThan</h4>
383 <p>
384
385 Tests whether the first argument is less than the second argument. Will
386 automatically treat the arguments as numbers if both arguments consists of only the characters 0 through 9 and optionally a decimal point. Otherwise, a String
387 comparison is used.
388 </p>
389 <p>
390
391 <div class="table">
392 <a name="N107D8">
393 </a>
394 <p class="title">
395 <b>
396 Table&nbsp;5.7.&nbsp;IsLessThan Attributes</b>
397 </p>
398 <table summary="IsLessThan Attributes" border="1">
399 <colgroup>
400 <col>
401 <col>
402 <col>
403 </colgroup>
404 <thead>
405 <tr>
406 <th>
407 Attribute</th>
408 <th>
409 Description</th>
410 <th>
411 Required</th>
412 </tr>
413 </thead>
414 <tbody>
415 <tr>
416 <td>
417 arg1</td>
418 <td>
419 The first argument.</td>
420 <td>
421 Yes</td>
422 </tr>
423 <tr>
424 <td>
425 arg2</td>
426 <td>
427 The second argument.</td>
428 <td>
429 Yes</td>
430 </tr>
431 </tbody>
432 </table>
433 </div>
434
435 </p>
436 <p>
437
438 <table border="0" bgcolor="#E0E0E0">
439 <tr>
440 <td>
441 <pre class="programlisting">
442
443
444 &lt;!-- evaluates to false --&gt;
445 &lt;islessthan arg1="6.02" arg2="4"/&gt;
446
447 &lt;!-- evaluates to true --&gt;
448 &lt;islessthan arg1="bar" arg2="foo"/&gt;
449
450 </pre>
451 </td>
452 </tr>
453 </table>
454
455 </p>
456 </div>
457 <hr>
458 <p align="center">Copyright &copy; 2003 Ant-Contrib Project. All
459 rights Reserved.</p>
460 </body>
461 </html>