Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not getting my variable value

Piyush Rathore
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having problem with my variable declaration in select option for xsl.
I got all my relative values for select options, now if i click on any option, i want to display the childs for subsequent node in a seperate <td>in form of table. I am unable to get my 'calc' variable in tb_cal table id which i am declaring in select option.
Here it is
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="" version="1.0">
<xsl:param name="calparam"><xsl:text></xsl:text></xsl:param>
<xsl:variable name="calc">
<xsl:value-of select="$calparam"/>
<xslutput method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<form name="myform">
<table id="main" border="1" width="100%">
<td width="50%">
<select name="param" size="4" style="text-align:left; visibility:visible; line-height: 150%; word-spacing: 2; border: 3px ridge #808000; margin-top:1" onchange="'visible'">
<xsl:for-each select="//neurology_cal/type/*">
<xsl:variable name="type_of_cal" select="local-name(.)"/>
<option value="{$type_of_cal}">
<xsl:if test="$calparam=$type_of_cal">
<xsl:attribute name="selected">selected</xsl:attribute>
<xsl:value-of select="$type_of_cal"/>
<table id="tb_cal" border="1" width="100%" style="visibility:hidden">
<xsl:for-each select="//neurology_cal/type/*[$calc]">
<td width="33%">
<xsl:value-of select="local-name(.)"/>
Can anybody help in getting my dynamic variable declaration.
Edit Commentisabled smiles.
[ April 30, 2004: Message edited by: Madhav Lakkapragada ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic