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

Re: XQuery - Two if's in a for loop

Subject: Re: XQuery - Two if's in a for loop
From: Liam R E Quin <liam@xxxxxx>
Date: Mon, 18 Apr 2011 15:53:01 -0400
Re:  XQuery - Two if's in a for loop
On Sun, 2011-04-17 at 13:36 -0700, sudheshna iyer wrote:
> Can I have multiple if's in a for loop?
> I have input xml. I need to do XQuery transformation to form output xml based on 
> occurance of elements in input xml

You were probably looking for an XQuery mailing list, not this one.

It sounds from your description like the concept you are seeking is
called "else".


> If ReturnParameterCode is "ONE", then block <ONE> should appear in the output
> if ReturnParameterCode = TWO is present then block <TWO> should appear. 

if ($ReturnParameterCode eq "ONE") then ONE else if
($ReturnParameterCode eq "TWO") then TWO else ()

Please direct any follow-up questions to an XQuery list such as
xquery-talk.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://www.fromoldbooks.org/

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.