The xsl:choose element selects one among a number of possible alternatives. It consists of a sequence of xsl:when elements
followed by an optional xsl:otherwise element. Each xsl:when element has a single attribute, test, which specifies an expression.
The content of the xsl:when and xsl:otherwise elements is a template. When an xsl:choose element is processed, each of the
xsl:when elements is tested in turn, by evaluating the expression and converting the resulting object to a boolean as if by
a call to the boolean function. The content of the first, and only the first, xsl:when element whose test is true is instantiated.
If no xsl:when is true, the content of the xsl:otherwise element is instantiated. If no xsl:when element is true, and no xsl:otherwise
element is present, nothing is created.
Examples (xslt:xml): Overview
25:1
59:13Interactive xlab:
|