|
Subject: [xsl] getting combo value,not textbox value From: himanshu padmanabhi <himanshu.padmanabhi@xxxxxxxxx> Date: Fri, 27 Feb 2009 15:13:01 +0530 |
This is my simple abc.xml
<records>
<one>
<label>machine name</label>
<desc>specify machine name</desc>
</one>
<one>
<label>limit</label>
<desc>specify limit which should not exceed</desc>
</one>
</records>
-----------------------------------------------------------------------------
--------------------------------------------------------
This is my corresponding abc.xsml
<xsl:template match="records">
<table border="1">
<tr>
<td> Parameter </td>
<td> Description </td>
<td> Value </td>
</tr>
<xsl:apply-templates/>
</table>
</xsl:template>
<xsl:template match="one">
<form name="form1" method="POST" action="one.cgi">
<tr>
<td>
<xsl:value-of select="label"/>
</td>
<td>
<xsl:value-of select="desc"/>
</td>
<td>
<xsl:if test="label = 'machine name'">
<select name="machine_name">
<xsl:call-template name="str:tokenize">
</xsl:call-template>
</select>
</xsl:if>
<xsl:if test="label = 'limit'">
<input type="text" name="limit" value="">
</input>
</xsl:if>
</td>
<input type="hidden" name="idx" value="{$idx}"/>
<input type="hidden" name="sidx" value="{$sidx}"/>
<input type="hidden" name="new" value="{$new}" />
</tr>
</form>
<script>
document.form1.submit();
</script>
</xsl:template>
-----------------------------------------------------------------------------
-------------------
Here,'machine_name' is combo box and 'limit' is text box.But I am
getting only the value of combo(which I select) in the $in hash in
next fom and not textbox's value.Why?Please help.
If I remove 'machine_name' entry from xml,xsl file,then I am getting
textbox's value in the $in hash in next form.
I am very poor in fundamentals of xml,xsl.I am even not sure how the
code flow is?
Means If there are 2 entries in XML file under tag 'one',then is
'<xsl:template match="one">' gets executed twice for each entry and
all.
I just started going through "XSLT Cookbook By Sal Mangano".
---------------------------
Thanks and Regards,
Himanshu Padmanabhi
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] small grouping task, Fred Christian | Thread | Re: [xsl] getting combo value,not t, Ronan Klyne |
| Re: [xsl] small grouping task, G. Ken Holman | Date | Re: [xsl] getting combo value,not t, Ronan Klyne |
| Month |