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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xsl and wml variables

Status
Not open for further replies.

don2241

IS-IT--Management
Jun 1, 2001
57
AU
Hi!
I'm working on in wml environment.
I'm trying to send a value retrived from a database and send it back to the server. My problem is when I store the variable it is stored in XSL syntax but when I'm trying to send it to the server the variable needs to be in WML syntax. How do I convert the '$(XXXXX)' variable for WML to accepting it to be sent to the server using <postfield/> My code looks like this:

<card id='c1'>
<do type='prev' label='Back'>
<prev/>
</do>
<p>
<table columns=&quot;2&quot;>
<xsl:for-each select=&quot;//Forums&quot;>
<tr>
<td><xsl:variable name=&quot;XXXXX&quot;><xsl:value-of select=&quot;ForumName&quot;/></xsl:variable>

<a href=&quot;#c2&quot;><xsl:value-of select=&quot;ForumName&quot;/></a></td>
</tr>
</xsl:for-each>
</table>
</p>
</card>

<card id=&quot;c2&quot;>
<do type='accept' label='OK'>
<go href='../ass3/wapController.jsp' method='post'>
<postfield name=&quot;action&quot; value=&quot;$(XXXXX)&quot;/>
</go>
</do>
<do type=&quot;prev&quot; label=&quot;Back&quot;>
<prev/>
</do>
</card>
 
This does not appear to be a Java question. here's a stab, though. It seems that the variable is being used outside of its scope. If you declare the variable outside of the cards, you might be able to assign it within one card and use it within another. not sure about that. Another idea is to create an xsl template to which you can pass the value of ForumName. Also, when referring to an xsl variable, you don't have parentheses around the variable name; you simply refer to it as $XXXXX. I'm not sure if either of those two solutions would fit your problem; this question might be better posed in the XML forum, or an XSL or WML forum if one such exists. My answers are based on a rudimentary knowledge of XSL/T and only a basic understanding of the concepts of WML. Liam Morley
lmorley@gdc.wpi.edu
&quot;light the deep, and bring silence to the world.
light the world, and bring depth to the silence.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top