473,466 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Global variables and recursive calls

Is it possible to update a global variable passed via a parameter in
'call-template' that is recursive, or does that create a circular reference?
I seem to be able to update only a local variable with the same name but may
not have the syntax right.

Jul 20 '05 #1
2 1641
Kevin Malone wrote:
Is it possible to update a global variable passed via a parameter in
'call-template' that is recursive, or does that create a circular reference?
I seem to be able to update only a local variable with the same name but may
not have the syntax right.


You can't "update" a variable at all. Once a value was assigned, it's
read-only.

Julian
Jul 20 '05 #2
In article <cTXMb.46786$xy6.116300@attbi_s02>,
Kevin Malone <km*****@infomatrix-usa.com> wrote:

% Is it possible to update a global variable passed via a parameter in
% 'call-template' that is recursive, or does that create a circular reference?

It's not clear to me what you mean, but this allows you to call a template
recursively while preserving the value of the parameter `parm-name':

<xsl:call-template name='template-name'>
<xsl:with-param name='parm-name' select='$parm-name'/>
</xsl:call-template>

It will work whether the parameter is defined in the template or at
the style sheet level, but the parameter must be in scope.

You may want to ask your question again, including a short example of
what you're trying to do.
--

Patrick TJ McPhee
East York Canada
pt**@interlog.com
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Loopy | last post by:
I'm learning XML and XSL at the moment, but I still can't get my head around the concept of non-updatable variables. I know we can use recursion to cycle through a data structure and get the sum...
11
by: Capstar | last post by:
Hi, I am working on an application, which will run embedded without an OS. The app is build up out of a couple of well defined parts. At first I wanted to keep those parts seperated and use...
10
by: Kleenex | last post by:
Reason: I am working on an embedded project which has very limited memory (under 512 bytes, 60 or so of which is stack space), which translates into limited stack space. In order to save on stack...
7
by: Michael | last post by:
Hi newsgroup, as the subject indicates I am looking for an advice using global variables. I am not if this problem is more about style then C. If its wrong in thi group, sorry. So I have a...
37
by: eoindeb | last post by:
Sorry to ask another global variable question, but from reading other posts I'm still not sure whether to use them or not. I have a program with a set function that calls 4 other functions in...
1
weaknessforcats
by: weaknessforcats | last post by:
C++: The Case Against Global Variables Summary This article explores the negative ramifications of using global variables. The use of global variables is such a problem that C++ architects have...
112
by: istillshine | last post by:
When I control if I print messages, I usually use a global variable "int silent". When I set "-silent" flag in my command line parameters, I set silent = 1 in my main.c. I have many functions...
7
by: pereges | last post by:
In a recursive program, do you think it is necessary to add the static keyword for every variable or do you think it is unnecessary ? Is every call associated with seperate copy of variables ?
20
by: teddysnips | last post by:
Weird. I have taken over responsibility for a legacy application, Access 2k3, split FE/BE. The client has reported a problem and I'm investigating. I didn't write the application. The...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.