[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Multiple arguments in one test
How do I perform a test to find an element whose attribute value equals a specific value and if the element itself contains specific text? For example, I want to find a "p" element that has an "outputclass" attribute whose value is "SupportInfo" and when those conditions are met, does that "p" element contain the keyword "Yes". And once all of those conditions are met, then do something (for example, output "this works"). XML snippet: ------------------- <p outputclass="SupportInfo">Yes</p> I have tried combining all arguments into 1 test but the latter part of the test is ignored. XSLT snippet: --------------------- <xsl:choose> <xsl:when test="//@outputclass='SupportInfo' and contains(., 'Yes')"> <tr> <td class="info"> <xsl:text>Print Supporting Information to PDF:</xsl:text> </td> <td> <a href="SupportEnterprise.pdf" target="new"> <img src="images/printer.gif" alt="PDF version" border="none"/> </a> </td> </tr> </xsl:when> </xsl:choose> Thanks for your help! _______________________________ Sharon Goldner Harris Content Management Evangelist Ultimate Software Group 704-660-6482 Confidentiality Note: This e-mail message and any attachments to it are intended only for the named recipients and may contain legally privileged and/or confidential information. If you are not one of the intended recipients, do not duplicate or forward this e-mail message.
|
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
|