Home >Online Product Documentation >Table of Contents >xsl:if
xsl:if
Conditionally instantiates the contained template body.
Format
Description
The XSLT processor evaluates the expression and converts the result to a Boolean value. If the result is true
, the XSLT processor instantiates template_body. If the result is false
, the xsl:if
element has no effect.
Example
This following example formats a group of names as a comma-separated list:
If you want the XSLT processor to choose which template to instantiate from several possibilities, specify the xsl:choose
instruction. See xsl:choose.