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

Subject: Re: [xsl] XQuery - Two if's in a for loop
From: Liam R E Quin <liam@xxxxxx>
Date: Mon, 18 Apr 2011 15:53:01 -0400
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