C.8.9.1.3. if then else stop

Conditionally processes a sequence of rules, depending on the value of a condition.

<if> condition
    <then>
        rules
        <stop/>
    </then>
    <else>
        rules
        <stop/>
    </else>
</if>
Remarks

eval statement. The not operator negates the value of a condition. The and and or operators perform logical operations on two conditions within an if statement.

The then statement contains a sequence of rules to process when the resolved value of the condition is true. An if statement must contain one then statement.

The else statement contains a sequence of rules to process when the resolved value of the condition is false. The else statement is optional. If used it must follow the close of the then statement.

The if...then...else structure is equivalent to the if...else statement in JScript:

if( condition )
    { statements }
    else { statements }

The stop statement ends processing of an event at a specific point. If a stop statement is not included within a then or else statement, rules following the if statement are processed. The stop statement is equivalent to the JScript return statement.

Element Information for <if>
Element Information for <then> and <else>