If
An if statement is used to surround other statements in an XSLT template to perform conditional processing. If the test attribute evaluates to true, the statements in the if are output, otherwise they are not output.
XSLT Equivalent
The following if statement surrounds an attribute for processing order items. All items except the last order item are retrieved from the output of the GetOrderInformation activity. The last order item is not output.
<ns:if xmlns:ns="http://www.w3.org/1999/XSL/Transform" test="not(position()=last())">
<ns:attribute name="OrderItem">
<ns:value-of select=
"$GetOrderInformation/OrderInformation/OrderDetails/OrderItem"/>
</ns:attribute>
</ns:if>