Is it possible to add logic to a custom email template?

It appears that WFG just ignores xsl, because it displays both TDs.

<xsl:variable name="typeflag"><WF_PROCESS_INST_RELDATA_VALUE.REQUEST_AUDIT_TYPE_FLAG></xsl:variable>

<tr>
    <td>Contract Decision</td>

    <xsl:if test="$typeflag = 'RETAIL'">
            <td><WF_PROCESS_INST_RELDATA_VALUE.REQUEST_RETAIL_DECISION></td>
    </xsl:if>

    <xsl:if test="$typeflag = 'CONTRACT'">
            <td><WF_PROCESS_INST_RELDATA_VALUE.REQUEST_CONTRACT_DECISION></td>
    </xsl:if>

</tr>