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

Re: save elments to an array and use later

Subject: Re: save elments to an array and use later
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Tue, 03 Dec 2013 11:32:02 +0100
Re:  save elments to an array and use later
henry human wrote:
thanks Martin
Now what if the conditon to save those elements is a little different:

if test = 'A' and element1 = 'F' or test1 = 'A' and element2 = 'F' or test3 = 'A' and element3 = 'F' .....

Assuming XSLT 2.0 you could use

<xsl:variable name="v1" select="root/child[test = 'A' and (element1, element2, element3) = 'F']"/>

But if you are happy to spell out your condition then of course you nearly literally write what you have above

<xsl:variable name="v1" select="root/child[(test = 'A' and element1 = 'F') or (test1 = 'A' and element2 = 'F') or (test3 = 'A' and element3 = 'F')]"/>

Current Thread


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.
First Name
Last Name
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.