[Top] [All Lists]

[xsl] Multiple conditions using if statement

2008-03-23 16:41:24
I'm using the following xsl and I would like to know how do I use
multiple conditions in the same if statement.  If I pass multiple
conditions it does not return any results because if the first condition
matches and there is no match in the second condition I'm not getting
any results.  Ideally I would like not to perform the test at all if
there is no value in the $lname variable or $pubid varialbe or only use
the corresponding test if there is any value in the variables. Is there
anyway to do that?


  <xsl:param name ="max" select ="10"></xsl:param>
  <xsl:param name ="cnt" select ="1"></xsl:param>
  <xsl:param name="lname" />
  <xsl:param name="pubid" />

  <xsl:template match="/">

        <xsl:for-each select="Collection/Content">
          <xsl:sort select="Html/root/SortDate" order ="descending" />
          <xsl:if test ="Html/root/Publication = $pubid or
Html/root[contains(AssocLawyers/a/text(), $lname)]" >

              <td valign="top">
                <xsl:value-of select="Html/root/display_date" />
                <a class="newslink" >
                  <xsl:attribute name="href">
                    <xsl:value-of select="QuickLink"/>
                  <xsl:value-of select="Html/root/Abstract"/>




Treasury Circular 230 Disclosure: To the extent this communication contains any 
statement regarding federal taxes, 
 that statement was not written or intended to be used, and it cannot be used, 
by any person (i) as a basis for avoiding 
 federal tax penalties that may be imposed on that person, or (ii) to promote, 
market or recommend to another party 
 any transaction or matter addressed herein.

CONFIDENTIALITY NOTICE: The information in this email may be confidential 
and/or privileged. This email is 
 intended to be reviewed by only the individual or organization named above. If 
you are not the intended recipient or an 
 authorized representative of the intended recipient, you are hereby notified 
that any review, dissemination or copying 
 of this email and its attachments, if any, or the information contained herein 
is prohibited. If you have received this 
 email in error, please immediately notify the sender by return email and 
delete this email from your system.
Thank You.

XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>

<Prev in Thread] Current Thread [Next in Thread>
  • [xsl] Multiple conditions using if statement, Davalath, Kishore <=