Subversion Repositories bacoAlunos

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1777 jmachado 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
<html>
3
  <head>
4
    <title>Ant-contrib Tasks: Switch</title>
5
  </head>
6
 
7
  <body>
8
    <h1>Switch</h1>
9
 
10
    <p>Task definition for the ANT task to switch on a particular value.</p>
11
 
12
    <h2>Parameters</h2>
13
    <table border="1" cellpadding="2" cellspacing="0">
14
      <tr>
15
        <th>Attribute</th>
16
        <th>Description</th>
17
        <th>Required</th>
18
      </tr>
19
      <tr>
20
        <td valign="top">value</td>
21
        <td valign="top">The value to switch on.</td>
22
        <td align="center" valign="top">Yes.</td>
23
      </tr>
24
      <tr>
25
        <td valign="top">caseinsensitive</td>
26
        <td valign="top">Should we do case insensitive comparisons?</td>
27
        <td align="center" valign="top">No, default is &quot;false&quot;</td>
28
      </tr>
29
    </table>
30
 
31
    <h2>Parameters specified as nested elements</h2>
32
 
33
    <p>At least one <code>&lt;case&gt;</code> or
34
    <code>&lt;default&gt;</code> is required.</p>
35
 
36
    <h3>case</h3>
37
 
38
    <p>An individual case to consider, if the value that is being
39
    switched on matches to value attribute of the case, then the
40
    nested tasks will be executed.</p>
41
 
42
    <h4>Parameters</h4>
43
    <table border="1" cellpadding="2" cellspacing="0">
44
      <tr>
45
        <th>Attribute</th>
46
        <th>Description</th>
47
        <th>Required</th>
48
      </tr>
49
      <tr>
50
        <td valign="top">value</td>
51
        <td valign="top">The value to match against the tasks value attribute.</td>
52
        <td align="center" valign="top">Yes.</td>
53
      </tr>
54
    </table>
55
 
56
    <h3>default</h3>
57
 
58
    <p>The default case for when no match is found.  Must not appear
59
    more than once per task.</p>
60
 
61
    <h2>Example</h2>
62
 
63
<pre>
64
&lt;switch value=&quot;${foo}&quot;&gt;
65
  &lt;case value=&quot;bar&quot;&gt;
66
    &lt;echo message=&quot;The value of property foo is bar&quot; /&gt;
67
  &lt;/case&gt;
68
  &lt;case value=&quot;baz&quot;&gt;
69
    &lt;echo message=&quot;The value of property foo is baz&quot; /&gt;
70
  &lt;/case&gt;
71
  &lt;default&gt;
72
    &lt;echo message=&quot;The value of property foo is not sensible&quot; /&gt;
73
  &lt;/default&gt;
74
&lt;/switch&gt;
75
</pre>
76
 
77
    <hr>
78
    <p align="center">Copyright &copy; 2002 Ant-Contrib Project. All
79
    rights Reserved.</p>
80
 
81
  </body>
82
</html>