Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

else if

Syntax

Description

Include instructions that are processed if the expression defined in the preceding if statement evaluates to FALSE and the expression defined in the else if statement evaluates to TRUE. You can include multiple else if statements. However, 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.

Attributes

expression

Specifies the expression to evaluate.

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

SLAX Example

The following example checks for a description at the current context. If it does not exist, the script then checks for a description at the parent level. If there is no description, the script prints the "no description found" message.

XSLT Equivalent

Release Information

Statement introduced in SLAX version 1.0.

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