“If” Expressions

XPath 2.0 also adds an “if” expression:

if ($part/@discounted)
   then $part/wholesale
   else $part/retail

Again, this is in XPath and might appear in a select attribute.

XSLT 2.0 retains the xsl:if and xsl:choose instructions.