<xsl:when> Element

Provides multiple conditional testing in conjunction with the <xsl:choose> and <xsl:otherwise> elements.

  test = boolean-expression

Required. The condition in the source data to test. If the Expressions (XML) in this attribute evaluates to True when cast to a Boolean, the content of <xsl:when> is instantiated and placed in the output. Node-sets are cast to a Boolean True if they contain at least one node.

Describes one of the alternatives to be chosen by the <xsl:choose> element. The default alternative is described by the <xsl:otherwise> element.

For simple conditional testing, use the <xsl:if> element.

See the example in <xsl:choose> Element.

Build Date: