Subject: RE: [xsl] Global variable problem From: cknell@xxxxxxxxxx Date: Wed, 12 May 2004 10:12:38 -0400 |
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: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Global variable problem, M. David Peterson | Thread | [xsl] Problems selecting nodes, Veronica Sanchez |
Re: [xsl] XSLTC, Antonio Gallardo | Date | RE: [xsl] Problems selecting nodes, M. David Peterson |
Month |