xsl:choose Element
Provides multiple conditional testing in conjunction with the <xsl:otherwise> and <xsl:when> elements.
<xsl:choose>
</xsl:choose>
Attributes
None.
Element Information
Number of occurrences | Unlimited |
Parent elements | xsl:attribute, xsl:comment, xsl:copy, xsl:element, xsl:for-each, xsl:if, xsl:otherwise, xsl:param, xsl:processing-instruction, xsl:template, xsl:variable, xsl:when, xsl:with-param, output elements |
Child elements | xsl:otherwise, xsl:when |
Remarks
The <xsl:when> children of the <xsl:choose> element are tested in order from top to bottom until a test attribute on one of these elements accurately describes conditions present in the source data or an <xsl:otherwise> element is reached. Once an <xsl:when> or <xsl:otherwise> element is chosen, the <xsl:choose> block is exited. No explicit break or exit statement is required.
For simple conditional testing, use the <xsl:if> element.
See Also
XSLT Elements | Conditional Templates
Last updated on Saturday, April 10, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.