2 Replies Latest reply: May 31, 2012 9:11 AM by 905160 RSS

    xsl tag issue

      Just want to compare the result of one tag is equal to 'US' then display value of <xsl:value-of select="Amount/Currency/Code" />
      else it has to display the value of <xsl:value-of select="Amount/Currency" />

      I am trying some thing like this...

      <xsl:if test="<xsl:value-of select="Address/2Digit"/> = 'US'>
      <xsl:value-of select="Amount/Currency/Code" />


      if the 2digit country is not US then it has to display the value of the below tag
      <xsl:value-of select="Amount/Currency" />
        • 1. Re: xsl tag issue
          <xsl:value-of select="Address/2Digit"/>
          "2Digit" is not a valid XML name, is it a typo?

          Anyway, you can use <tt>xsl:choose</tt> element :
            <xsl:when test="Address/Digit='US'">
              <xsl:value-of select="Amount/Currency/Code" />
              <xsl:value-of select="Amount/Currency" />
          • 2. Re: xsl tag issue
            Thanks, it worked...It was my typo mistake