[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Multiple conditions using if statement
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? Thanks, Kishore <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="/"> <html> <body> <table> <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)]" > <tr> <td valign="top"> <xsl:value-of select="Html/root/display_date" /> </td> <td> <a class="newslink" > <xsl:attribute name="href"> <xsl:value-of select="QuickLink"/> </xsl:attribute> <xsl:value-of select="Html/root/Abstract"/> </a> </td> </tr> </xsl:if> </xsl:for-each> </table> </body> </html> </xsl:template> 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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|