Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 11th, 2006, 01:43 AM
Authorized User
Join Date: Sep 2006
Location: pune, Maharastra, India.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default setting value of the variables depending on condit

How to set the value of variable depending upon the condition?
suppose i have declare the varaible with default value.
        <xsl:variable name="flag" select="0"/>
        <xsl:for-each select="/root">

         <xsl:variable name="flag" select="1"/>

        <xsl:if test="$flag=1">
                <xsl:value-of select="root/name"/>

Here variable flag loosing its scope.

How do i reset the value of variable depending upon the condition?

If it is not possible using the xsl:variable then what should i use?

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get values depending on the attribute vidhya XSLT 1 July 8th, 2005 03:55 AM
to get Distinct Node depending on attribute value chaitanyaXML XML 5 March 29th, 2005 10:26 AM
Setting Session variables problems hoffmann JSP Basics 0 February 9th, 2005 11:58 AM
Displaying text depending on the value of a field lguzman Access VBA 1 May 30th, 2004 06:14 PM
Code depending on Register Globals char Beginning PHP 2 July 31st, 2003 11:45 AM

All times are GMT -4. The time now is 07:10 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.