Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating a variable

Status
Not open for further replies.

acsooley

Programmer
Nov 13, 2002
32
0
0
CA
In xsl i would like to create a variable

<xsl:variable name="adam" select="$adam, new"/>

this seems not to work for me. I am in a for-each loop and would like to keep adding the variable + text like in jsp when you can say

String a = "3";
a = a + "7";
a = a + "6";
a = a + "9";

out.println(a);

Is there a way to add a variables value to its self?
 
I fighted with the same problem back in autumn when I was studying XSL and came to a sad conclusion: no, you can not add (or subtract or basicly anything) a value of a variable. In another words, a variable in XSL is not a variable in common programming language sense :/

For example, making a for-loop is very tricky (not impossible) and has to be done with recursive function.

I'm sad to say, that you'll to think some other solution to your problem (or ask someone wiser...)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top