xsl-list
[Top] [All Lists]

RE: [xsl] Param redirection

2006-07-31 11:45:42
Thanks Steve and Mukul!  That is exactly what I was looking for!!!

Regards,
Dave

-----Original Message-----
From: Mukul Gandhi [mailto:gandhi(_dot_)mukul(_at_)gmail(_dot_)com] 
Sent: Monday, July 31, 2006 11:43 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Param redirection

On 8/1/06, David Nesbitt <dnesbitt(_at_)vuetechnology(_dot_)com> wrote:
This is a question about how to program with XSLT.

I would like to have the following parameters in my stylesheet:

<xsl:param name="a_or_b"/>
<xsl:param name="a"/>
<xsl:param name="b"/>

If the value of param "a_or_b" is "a", I would like to output the
value
of param "a".  If the value of param "a_or_b" is "b", I would like to
output the value of param "b".

I think this will work for you:

<xsl:choose>
  <xsl:when test="$a_or_b = 'a'">
     <xsl:value-of select="$a" />
  </xsl:when>
  <xsl:when test="$a_or_b = 'b'">
     <xsl:value-of select="$b" />
  </xsl:when>
</xsl:choose>

-- 
Regards,
Mukul Gandhi

http://gandhimukul.tripod.com

--~------------------------------------------------------------------
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>
--~--


--~------------------------------------------------------------------
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>