< bool>位置的其他选项标签 [英] other option at place of <bool> tag

查看:85
本文介绍了< bool>位置的其他选项标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<if>
   <bool>
      <isgreaterthan arg1="${abc}" arg2="${xyz}"/>
   </bool>
</if>

当我运行代码时,它显示错误if doesn't support the nested "bool" element.

when i am running the code, it's showing the error if doesn't support the nested "bool" element. is there any other option is there at the place of bool which supported by if

推荐答案

Ant Flaka 是一个新的Ant插件,提供了一种创新的表达语言,该语言使许多脚本部分都已过时.除此之外,Flaka还提供条件和重复的控制结构,例如何时,除非,何时为选择进行切换. 您与Flaka的if语句看起来像=

Ant Flaka is a new Ant Plugin that provides an innovative Expression Language which makes many scripting part obsolete. Beside that Flaka provides conditional and repetitive control structures like when, unless, while, for, choose, switch .. Your if statement with Flaka would look like =

<project xmlns:fl="antlib:it.haefelinger.flaka">

  <property name="digitA" value="42"/>
  <property name="digitB" value="23"/>
  <property name="wordA"  value="abcd"/>
  <property name="wordB"  value="efgh"/>

  <!-- compare of digits -->
  <fl:when test=" '${digitA}' > '${digitB}' ">
    <echo>${digitA} gt ${digitB}</echo>
  </fl:when>

  <!-- example with string compare in switch -->
  <fl:switch value="${wordA}">
    <cmp gt="${wordB}">
      <echo>${wordA} gt ${wordB}</echo>
    </cmp>
    <cmp lt="${wordB}">
    <echo>${wordA} lt ${wordB}</echo>
    </cmp>
  </fl:switch>

</project>

请参阅全面的 Flaka手册以获取更多详细信息!

please see the comprehensive Flaka Manual for further details !

这篇关于&lt; bool&gt;位置的其他选项标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆