[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] element selection based on attribute value not working - xsl, fop, pdf
Subject: Re: [xsl] element selection based on attribute value not working - xsl, fop, pdf From: vinod.agarwal@xxxxxxxxxxxxxx Date: Fri, 19 Sep 2003 10:18:47 +0200 |
thanks for the answer. But, my problem is that I cannot use the for-each loop as it will fetch only one element at a time. But, I want all the matching "PHONE" attribute "communicationmethodsActual" elements at once and likewise for "EMAIL", "FAX" etc. One such reason for this is that I want to print the label "phone" , "email" only once for a group of such elements, and that is possible only if I get all the related elements in one go and I use the "position()" function to check for "position() = 1" and print the label. tia. --vinod. Mukul Gandhi <mukulw3@xxxxxxxxx>@... on 09/18/2003 07:19:05 PM Please respond to xsl-list@xxxxxxxxxxxxxxxxxxxxxx Sent by: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx cc: Subject: Re: [xsl] element selection based on attribute value not working - xsl, fop, pdf Hi Vinod, the syntax you have posted is correct.. don't know why its not working. You may also try -- <xsl:for-each select="communicationmethodsActual"> <xsl:if test="@PURPOSE = 'PHONE'"> <!-- some processing --> </xsl:if> <xsl:if test="@PURPOSE = 'EMAIL'"> <!-- some processing --> </xsl:if> <xsl:if test="@PURPOSE = 'FAX'"> <!-- some processing --> </xsl:if> </xsl:for-each> But your way looks more elegant.. Regards, Mukul > <xsl:apply-templates > select="communicationmethodsActual[@PURPOSE='PHONE']"/> > <xsl:apply-templates > select="communicationmethodsActual[@PURPOSE='FAX']"/> > <xsl:apply-templates > select="communicationmethodsActual[@PURPOSE='EMAIL']"/> > > > But, the apply-templates with attribute selection is > not working. It doesn't select any node wih the > above syntax. __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list --------------------------------------------------------------------------- This message (including any attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorised use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. ABN AMRO Bank N.V. (including its group companies) shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. ABN AMRO Bank N.V. (or its group companies) does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference. --------------------------------------------------------------------------- XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] element selection based o, Mukul Gandhi | Thread | Re: [xsl] element selection based o, Mukul Gandhi |
RE: [xsl] how getting a list of occ, Stuart Brown | Date | Re: [xsl] how getting a list of occ, Elena Pierazzo |
Month |
Keywords