Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

if

Syntax

Description

Include a conditional construct that causes instructions to be processed if the Boolean expression evaluates to TRUE.

Optionally, you can include multiple else if statements to perform additional conditional tests if the if expression evaluates to FALSE. The processor only executes the instructions contained in the first else if statement whose expression evaluates to TRUE. The processor ignores all subsequent else if statements.

The optional else statement includes a default set of instructions. The processor executes the instructions if the expressions defined in all associated if and else if statements evaluate to FALSE.

Attributes

expression

Specifies the expression to evaluate.

Starting in SLAX version 1.3, the parentheses enclosing the statement expression are optional.

SLAX Example

XSLT Equivalent

Release Information

Statement introduced in SLAX version 1.0.

Support for syntax with optional parentheses added in SLAX version 1.3.