views:

106

answers:

1

Are nested 'if' statements permitted? ex:

<if cond="1 == 1">
  <if cond="2 == 2">
      One is in fact equal to one and Two is in fact equal to two
  <else/>
      One is in fact equal to one but Two is never not equal to two
  </if>
<else/>
  One is never not equal to one
</if>

I realize I could rewrite this condition with an '&&' statement but the logic that I am trying to do would be messy to keep repeating in the chain of if elseifs that it would have to be.

+1  A: 

Yes, according to the schema definition found here. An if is an executable.content element, which is allowed to contain a sequence of zero or more executable.content elements.

John Feminella