Gert Driesen wrote:

> For those of you that have been begging for an "if, then, else" 
> construct in NAnt ...

Looks great - using the same construct as XSLT makes a lot of sense.

Just one comment though - the documentation page does indicate that the
<when> clauses are evaluated from top to bottom, but it took me three or
four readings to find it. Perhaps the order of evaluation needs to be
more conspicuous? And maybe an example to ram the point home ...

Since it's bad form to criticise without being willing to fix it, here
is one possible rephrasing:


        The <choose> task executes only the tasks contained within the 
        first <when> element whose test expression is true.

        If multiple <when> elements have true tests, only the tasks 
        contained by the first (in document order) are exectuted.

        If no contained <when> clause tests true, tasks (if any)
contained 
        by the <otherwise> element are executed instead.

Examples

        ii Demonstrate priority of <when> elements

        <choose>
          <when test="...">
          </when>
          <when test="true">
          </when>
          <when test="...">
          </when>
        </choose>

        If the first <when> element is not executed, the second will
always be. The third
        <when> clause will never be executed


Hmmm ... These don't read as well as what you already have. I'll have a
think and followup with some alternatives if I can come up with them.

Keep Smiling,
Bevan.



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users




******************************************************************************
"This message (and any files transmitted with it) are confidential and 
may be legally privileged. If you are not the intended recipient please
notify the sender immediately and delete this message from your system.

This message does not necessarily reflect the views of the
Reserve Bank of New Zealand. If the recipient has any concerns
about the content of this message they should seek alternative
confirmation from the Reserve Bank of New Zealand."
******************************************************************************





-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_idt12&alloc_id344&op=click
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to