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

RE: Global variable problem

Subject: RE: Global variable problem
From: cknell@xxxxxxxxxx
Date: Wed, 12 May 2004 10:12:38 -0400
xsl global variable
Based on your Subject: line, I understand you to mean that you want to declare a global variable at the top of your stylesheet and assign a value to it later. This cannot be done. You must assign a value to the variable within the element used to declare it. This misunderstanding of variables in XSLT is frequently made by programmers new to XSLT.

However, by looking at your XSLT, I see two places where you select the value-of the global variable for display. Since the variable was declared without a value, you will get nothing when you select the value-of. From your stylesheet I don't see an attempt to assign a value to the variable anywhere, so maybe I am mislead by your subject line.

What exactly is the problem you are having? Neither the code, nor the data, nor description makes it plain.
-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     Angeshwar Deepak <angeshwar@xxxxxxxxx>
Sent:     Wed, 12 May 2004 05:59:09 -0700 (PDT)
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:   Global variable problem

Hi,

I have a problem. I have declared a global variable
in the <xsl:stylesheet tag.

I am using a jscript function which is called from a
for-each loop. The function which returns a value is
stored in xsl variable. I want to use this variable in
another for-each loop.

(Note that the value is dynamic ie only after the end
of the loop i get the final value)-so i need the final
value after the end of loop.

I read the previous replies concerning this problem
but could not get any solution.

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.