[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Multiple arguments in one test

Subject: Re: Multiple arguments in one test
From: Michael Dykman <mdykman@xxxxxxxxx>
Date: Tue, 16 Nov 2010 13:51:24 -0500
Re:  Multiple arguments in one test
*[@outputclass='SupportInfo'][string() = 'Yes']

 - md

On Tue, Nov 16, 2010 at 1:48 PM,  <Sharon_Harris@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> 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.
>
>



--
 - michael dykman
 - mdykman@xxxxxxxxx

 May the Source be with you.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.