xsl-list
[Top] [All Lists]

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

2011-04-18 04:17:58
sudheshna iyer wrote:

  Hi,

In other words, I want something like below. Please note that
these are not else if. It is working if i put else if. But I
want all the blocks..not just one or two or three..

If (ReturnParameterCode = One) then block one should be present
If (ReturnParameterCode = two) then block two should be present
If (ReturnParameterCode = three) then block three should be present

  In XSLT, you do it naturally by using template rules:

    <xsl:template match="ReturnParameterCode[. eq 'ONE']">
       ...
    </xsl:template>

    <xsl:template match="ReturnParameterCode[. eq 'TWO']">
       ...
    </xsl:template>

    <xsl:template match="ReturnParameterCode[. eq 'THREE']">
       ...
    </xsl:template>

  For XQuery, to get the best responses, I suggest you ask the
list XQuery Talk <http://www.x-query.com/mailman/listinfo/talk>.

  Regards,

-- 
Florent Georges
http://fgeorges.org/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>