[xsl] newbie question

Subject: [xsl] newbie question
From: Madhavi Thottempudi <madhavi@xxxxxxxxxxxxxxx>
Date: Tue, 29 Oct 2002 11:17:13 +0000
Hi there!
My requirement is to define a variable depending on the mode - edit or create.
What I am doing is:

<xsl:variable name="uContact"><xsl:value-of select="//request/param[@name='email']"/></xsl:variable>

<xsl:if test="//request/param[@name='action']='Edit'">
<xsl:variable name="uContact><xsl:value-of select="./selection/email"/></xsl:variable>



And I must be able to use the above defined value in a table
<tr>
<td>Contact:</td>
<td><input type="text" name="email" size="25" maxlength="25" value="{$uContact"/></td>
</tr>


My problem is the variavle I have defined in if statement is not visible to the table.
Is there any way I can just declare a variable somewhere and assign a value to it where ever I want??
Ex: var x= "";
if (.....)
x="I am in if";
else
x="i am in else";


I am not a xslt person and really struggling over this seemingly simply thing. Any help would be greatly appreciated.

thanks
-M



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread