dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: How can I use the xsl:when to test a compound condition?

  1. #1
    Join Date
    Mar 2003
    Posts
    145

    How can I use the xsl:when to test a compound condition?

    Until now, all my conditions were simple ones, so I had no trouble using the xsl:choose and xsl:when element.
    For example,
    Code:
    <xsl:choose>
      <xsl:when test="@item = 'fruit'">
        … DO SOMETHING
      </xsl:when>
      <xsl:otherwise>
        … DO SOMETHING ELSE
      </xsl:otherwise>
    </xsl:choose>
    But now I want to test a compound condition.
    For example,
    If attribute ‘item’ equals fruit, and attribute ‘item-num’ is greater than 1, then do something. Otherwise, do something else.

    How do I do that?

  2. #2
    Join Date
    Apr 2008
    Posts
    12

    Re: How can I use the xsl:when to test a compound condition?

    You just have to use more operators : @item = 'fruit' and @item-num &gt; 1
    XForms for browsers without plug-in : http://www.agencexml.com/xsltforms/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)