Changeset 98
- Timestamp:
- 07/14/06 15:54:45 (2 years ago)
- Files:
-
- branches/2.2/docs/phing_guide/book/chapters/ProjectComponents.html (modified) (1 diff)
- branches/2.2/docs/phing_guide/book/chapters/appendixes/AppendixB-CoreTasks.html (modified) (2 diffs)
- branches/2.2/docs/phing_guide/book/toc/FrameToC.html (modified) (3 diffs)
- branches/2.2/docs/phing_guide/book/toc/ToC.html (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.2/docs/phing_guide/book/chapters/ProjectComponents.html
r1 r98 355 355 C</a>.</p> 356 356 357 <h2><a name="Conditions">Conditions</a></h2> 358 359 <p>Conditions are nested elements of the 360 <a href="appendixes/AppendixB-CoreTasks.html#ConditionTask">condition</code></a> and 361 <a href="appendixes/AppendixB-CoreTasks.html#IfTask">if</a> tasks. 362 </p> 363 364 <h4>not</h4> 365 <p>The <code><not></code> element expects exactly one other 366 condition to be nested into this element, negating the result of the 367 condition. It doesn't have any attributes and accepts all nested 368 elements of the condition task as nested elements as well.</p> 369 370 <h4>and</h4> <p> 371 The <code><and></code> element doesn't have any attributes and 372 accepts an arbitrary number of conditions as nested elements. This condition 373 is true if all of its contained conditions are, conditions will be 374 evaluated in the order they have been specified in the build file.</p> 375 376 <p>The <code><and></code> condition has the same shortcut 377 semantics as the && operator in some programming languages, as soon as one of the 378 nested conditions is false, no other condition will be evaluated.</p> 379 380 <h4>or</h4> <p> 381 The <code><or></code> element doesn't have any attributes and 382 accepts an arbitrary number of conditions as nested elements. This condition 383 is true if at least one of its contained conditions is, conditions 384 will be evaluated in the order they have been specified in the build 385 file.</p> 386 387 <p>The <code><or></code> condition has the same 388 shortcut semantics as the || operator in some programming languages, as soon as one of the 389 nested conditions is true, no other condition will be evaluated.</p> 390 391 <h4>available</h4> 392 <p>This condition is identical to the <a 393 href="appendixes/AppendixB-CoreTasks.html#AvailableTask">Available</a> task, all attributes and nested 394 elements of that task are supported, the property and value attributes 395 are redundant and will be ignored.</p> 396 397 <h4>uptodate</h4> 398 <p>This condition is identical to the <a 399 href="appendixes/AppendixB-CoreTasks.html#UpToDateTask">UpToDate</a> task, all attributes and nested 400 elements of that task are supported, the property and value attributes 401 are redundant and will be ignored.</p> 402 403 <h4>os</h4> 404 <p>Test whether the current operating system is of a given type.</p> 405 406 <table border="1" cellpadding="2" cellspacing="0"> 407 <tr> 408 <td valign="top"><b>Attribute</b></td> 409 <td valign="top"><b>Description</b></td> 410 <td align="center" valign="top"><b>Required</b></td> 411 </tr> 412 <tr> 413 <td valign="top">family</td> 414 <td valign="top">The name of the operating system family to expect.</td> 415 <td valign="top" align="center">Yes</td> 416 </tr> 417 </table> 418 <p>Supported values for the family attribute are: 419 <ul> 420 <li>windows (for all versions of Microsoft Windows)</li> 421 <li>mac (for all Apple Macintosh systems)</li> 422 <li>unix (for all Unix and Unix-like operating systems)</li> 423 </ul> 424 425 <h4>equals</h4> 426 <p>Tests whether the two given Strings are identical</p> 427 <table border="1" cellpadding="2" cellspacing="0"> 428 <tr> 429 <td valign="top"><b>Attribute</b></td> 430 <td valign="top"><b>Description</b></td> 431 <td align="center" valign="top"><b>Required</b></td> 432 </tr> 433 <tr> 434 <td valign="top">arg1</td> 435 <td valign="top">First string to test.</td> 436 <td valign="top" align="center">Yes</td> 437 </tr> 438 <tr> 439 <td valign="top">arg2</td> 440 <td valign="top">Second string to test.</td> 441 <td valign="top" align="center">Yes</td> 442 </tr> 443 <tr> 444 <td valign="top">casesensitive</td> 445 <td valign="top">Perform a case sensitive comparision. Default is 446 true.</td> 447 <td valign="top" align="center">No</td> 448 </tr> 449 <tr> 450 <td valign="top">trim</td> 451 <td valign="top">Trim whitespace from arguments before comparing 452 them. Default is false.</td> 453 <td valign="top" align="center">No</td> 454 </tr> 455 </table> 456 457 <h4>isset</h4> 458 <p>Test whether a given property has been set in this project.</p> 459 <table border="1" cellpadding="2" cellspacing="0"> 460 <tr> 461 <td valign="top"><b>Attribute</b></td> 462 <td valign="top"><b>Description</b></td> 463 <td align="center" valign="top"><b>Required</b></td> 464 </tr> 465 <tr> 466 <td valign="top">property</td> 467 <td valign="top">The name of the property to test.</td> 468 <td valign="top" align="center">Yes</td> 469 </tr> 470 </table> 471 472 <h4>contains</h4> 473 <p>Tests whether a string contains another one.</p> 474 <table border="1" cellpadding="2" cellspacing="0"> 475 <tr> 476 <td valign="top"><b>Attribute</b></td> 477 <td valign="top"><b>Description</b></td> 478 <td align="center" valign="top"><b>Required</b></td> 479 </tr> 480 <tr> 481 <td valign="top">string</td> 482 <td valign="top">The string to search in.</td> 483 <td valign="top" align="center">Yes</td> 484 </tr> 485 <tr> 486 <td valign="top">substring</td> 487 <td valign="top">The string to search for.</td> 488 <td valign="top" align="center">Yes</td> 489 </tr> 490 <tr> 491 <td valign="top">casesensitive</td> 492 <td valign="top">Perform a case sensitive comparision. Default is 493 true.</td> 494 <td valign="top" align="center">No</td> 495 </tr> 496 </table> 497 498 <h4>istrue</h4> 499 <p>Tests whether a string evals to true.</p> 500 501 <table border="1" cellpadding="2" cellspacing="0"> 502 <tr> 503 <td valign="top"><b>Attribute</b></td> 504 <td valign="top"><b>Description</b></td> 505 <td align="center" valign="top"><b>Required</b></td> 506 </tr> 507 <tr> 508 <td valign="top">value</td> 509 <td valign="top">value to test</td> 510 <td valign="top" align="center">Yes</td> 511 </tr> 512 </table> 513 <pre> 514 <istrue value="${someproperty}"/> 515 <istrue value="false"/> 516 </pre> 517 518 <h4>isfalse</h4> 519 <p>Tests whether a string evals to not true, the negation of <istrue> 520 </p> 521 <table border="1" cellpadding="2" cellspacing="0"> 522 <tr> 523 <td valign="top"><b>Attribute</b></td> 524 <td valign="top"><b>Description</b></td> 525 <td align="center" valign="top"><b>Required</b></td> 526 </tr> 527 <tr> 528 <td valign="top">value</td> 529 <td valign="top">value to test</td> 530 <td valign="top" align="center">Yes</td> 531 </tr> 532 </table> 533 <pre> 534 <isfalse value="${someproperty}"/> 535 <isfalse value="false"/> 536 </pre> 537 357 538 </body> 358 539 </html> branches/2.2/docs/phing_guide/book/chapters/appendixes/AppendixB-CoreTasks.html
r97 r98 297 297 --> 298 298 299 <h2><a name="ConditionTask"></a>ConditionTask</h2> 300 <p>Sets a property if a certain condition holds true - this is a 301 generalization of <a href="#AvailableTask">Available</a> and 302 <a href="#UpToDateTask">UpToDate</a>.</p> 303 <p>If the condition holds true, the property value is set to true by 304 default; otherwise, the property is not set. You can set the value to 305 something other than the default by specifying the <code>value</code> 306 attribute.</p> 307 <p>Conditions are specified as nested elements, you must specify exactly 308 one condition - see the <a href="../ProjectComponents.html#Conditions">documentation</a> 309 for a complete list of nested elements.</p> 310 <h3>Example</h3> 311 <pre> 312 <condition property="isMacOrWindows"> 313 <and> 314 <os family="mac"/> 315 <os family="windows"/> 316 </and> 317 </condition> 318 </pre> 319 <h3>Attributes</h3> 320 <table> 321 <thead> 322 <tr> 323 <th>Name</th> 324 <th>Type</th> 325 <th>Description</th> 326 <th>Default</th> 327 <th>Required</th> 328 </tr> 329 </thead> 330 <tbody> 331 <tr> 332 <td>property</td> 333 <td>String</td> 334 <td>The name of the property to set.</td> 335 <td>n/a</td> 336 <td>Yes</td> 337 </tr> 338 <tr> 339 <td>value</td> 340 <td>String</td> 341 <td>The value to set the property to. Defaults to "true".</td> 342 <td>true</td> 343 <td>No</td> 344 </tr> 345 </tbody> 346 </table> 347 299 348 <h2><a name="CopyTask"></a>CopyTask</h2> 300 349 <p> … … 778 827 </tbody> 779 828 </table> 829 830 <h2><a name="IfTask"></a>IfTask</h2> 831 <p>Perform some tasks based on whether a given condition holds true or not.</p> 832 <h3>Attributes</h3> 833 <p> 834 This task doesn't have any attributes, the condition to test is specified by a nested 835 element - see the <a href="../ProjectComponents.html#Conditions">documentation</a> 836 for a complete list of nested elements.</p> 837 <p>Just like the <code><condition></code> task, only a 838 single condition can be specified - you combine them using 839 <code><and></code> or <code><or></code> 840 conditions.</p> 841 <p>In addition to the condition, you can specify three different 842 child elements, <code><elseif></code>, <code><then></code> and 843 <code><else></code>. All three subelements are optional. 844 845 Both <code><then></code> and <code><else></code> must not be 846 used more than once inside the if task. Both are 847 containers for Phing tasks.</p> 848 849 <p>The <code><elseif></code> behaves exactly like an <code><if></code> 850 except that it cannot contain the <code><else></code> element 851 inside of it. You may specify as may of these as you like, and the 852 order they are specified is the order they are evaluated in. If the 853 condition on the <code><if></code> is false, then the first 854 <code><elseif></code> who's conditional evaluates to true 855 will be executed. The <code><else></code> will be executed 856 only if the <code><if></code> and all <code><elseif></code> 857 conditions are false.</p> 858 <h3>Example</h3> 859 <pre> 860 <if> 861 <equals arg1="${foo}" arg2="bar" /> 862 <then> 863 <echo message="The value of property foo is bar" /> 864 </then> 865 <else> 866 <echo message="The value of property foo is not bar" /> 867 </else> 868 </if> 869 </pre> 870 871 <pre> 872 <if> 873 <equals arg1="${foo}" arg2="bar" /> 874 <then> 875 <echo message="The value of property foo is 'bar'" /> 876 </then> 877 878 <elseif> 879 <equals arg1="${foo}" arg2="foo" /> 880 <then> 881 <echo message="The value of property foo is 'foo'" /> 882 </then> 883 </elseif> 884 885 <else> 886 <echo message="The value of property foo is not 'foo' or 'bar'" /> 887 </else> 888 </if> 889 </pre> 780 890 781 891 <h2><a name="IncludePathTask"></a>IncludePathTask</h2> branches/2.2/docs/phing_guide/book/toc/FrameToC.html
r88 r98 60 60 <li><a href="../chapters/ProjectComponents.html#Types" target="Content">Types</a></li> 61 61 <li><a href="../chapters/ProjectComponents.html#BasicTypes" target="Content">Basic Types</a></li> 62 <li><a href="../chapters/ProjectComponents.html#Conditions" target="Content">Conditions</a></li> 62 63 </ul> 63 64 </ul> … … 93 94 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#AvailableTask" target="Content">AvailableTask</a></li> 94 95 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#CallTargetTask" target="Content">CallTargetTask</a></li> 96 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#ConditionTask" target="Content">ConditionTask</a></li> 95 97 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#CopyTask" target="Content">CopyTask</a></li> 96 98 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#DeleteTask" target="Content"> DeleteTask</a></li> … … 99 101 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#ExitTask" target="Content">ExitTask</a></li> 100 102 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#ForeachTask" target="Content">ForeachTask</a></li> 103 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#IfTask" target="Content">IfTask</a></li> 101 104 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#IncludePathTask" target="Content">IncludePathTask</a></li> 102 105 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#InputTask" target="Content">InputTask</a></li> branches/2.2/docs/phing_guide/book/toc/ToC.html
r88 r98 45 45 <li><a href="../chapters/ProjectComponents.html#Types">Types</a></li> 46 46 <li><a href="../chapters/ProjectComponents.html#BasicTypes">Basic Types</a></li> 47 <li><a href="../chapters/ProjectComponents.html#Conditions">Conditions</a></li> 47 48 </ul> 48 49 </ul> … … 78 79 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#AvailableTask">AvailableTask</a></li> 79 80 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#CallTargetTask">CallTargetTask</a></li> 81 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#ConditionTask">ConditionTask</a></li> 80 82 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#CopyTask">CopyTask</a></li> 81 83 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#DeleteTask"> DeleteTask</a></li> … … 84 86 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#ExitTask">ExitTask</a></li> 85 87 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#ForeachTask">ForeachTask</a></li> 88 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#IfTask">IfTask</a></li> 86 89 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#IncludePathTask">IncludePathTask</a></li> 87 90 <li><a href="../chapters/appendixes/AppendixB-CoreTasks.html#InputTask">InputTask</a></li>
