XML & XSL - xsl:choose


Multiple conditional testing in conjunction with the xsl:otherwise and xsl:when.

Syntax

<xsl:choose>

Attributes

None.

Parent Elements

Child Elements

Purpose

xsl:when children of the xsl:choose element are parsed in order from top to bottom until a match is found or an xsl:otherwise element is reached. Once a xsl:when or xsl:otherwise element is chosen, the xsl:choose block is exited. No break or exit is required.

Use the xsl:if for simple conditional testing.

Global Population Extraction Example

Click here to view an example.