Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

xsl:choose

Syntax

Description

Evaluate multiple conditional tests, and execute instructions for the first test that evaluates to TRUE or execute an optional default set of instructions if all tests evaluate to FALSE. The <xsl:choose> instruction contains one or more <xsl:when> elements, each of which tests a Boolean expression. If the test evaluates to TRUE, the XSLT processor executes the instructions in the <xsl:when> element, and ignores all subsequent <xsl:when> elements. The XSLT processor processes only the instructions contained in the first <xsl:when> element whose test attribute evaluates to TRUE. If none of the <xsl:when> elements’ test attributes evaluate to TRUE, the content of the optional <xsl:otherwise> element, if one is present, is processed.