Hello,
I need to write condition if one of the id’s = "" then change text.
I have this code:
<xsl:choose>
<xsl:when test = 'select="Pmnt_Id" =""'>
<td width="125">Trans Id</td></xsl:when>
<xsl:when test = 'select="Transaction_Id" = ""'>
<td width="125">Pmnt Id</td></xsl:when>
</xsl:choose>
It works,
Now, in the case if I get both Id's how can I display both lables?
I tried
to use
<xsl:choose>
<xsl:when test = 'select="Pmnt_Id" =""'>
<td width="125">Trans Id</td></xsl:when>
<xsl:when test = 'select="Transaction_Id" = ""'>
<td width="125">Pmnt Id</td></xsl:when>
<xsl:otherwise><td width="62">Trans Id</td>
<td width="62">Pmnt Id</td>
</xsl:otherwise>
</xsl:choose>
Subject:xsl if, otherwise Author:Minollo I. Date:20 Apr 2006 04:33 PM
http://www.w3.org/TR/xslt#section-Conditional-Processing-with-xsl:choose
"The content of the first, and only the first, xsl:when element whose test is true is instantiated. If no xsl:when is true, the content of the xsl:otherwise element is instantiated. If no xsl:when element is true, and no xsl:otherwise element is present, nothing is created"
You will need to create an <xsl:when> defining the action required to cover the additional condition...