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

Re: newbie question

Subject: Re: newbie question
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Tue, 29 Oct 2002 11:25:58 -0000
vasu madhavi
Hi Madhavi,
you can do the following

<xsl:variable  name  = "uContact">
   <xsl:choose>
    <xsl:when test="your condition">
     <xsl:text>The condition is satisfied</xsl:text>
    </xsl:when>
    <xsl:otherwise>
     <xsl:text>The condition is not satisfied</xsl:text>
    </xsl:otherwise>
   </xsl:choose>
  </xsl:variable>

  <xsl:value-of select="$uContact"/>

This will set the value of the uContact based on the condition
HTH
Vasu

----- Original Message -----
From: "Madhavi Thottempudi" <madhavi@xxxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, October 29, 2002 11:17 AM
Subject:  newbie question


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

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


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.