This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
applying a xsl sheet to data when posted from a form
- To: "'XSL-List at lists dot mulberrytech dot com'" <XSL-List at lists dot mulberrytech dot com>
- Subject: [xsl] applying a xsl sheet to data when posted from a form
- From: Emmett Golde <ergolde at mtu dot edu>
- Date: Thu, 6 Sep 2001 12:08:49 -0400
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hello All,
I am trying to translate data from an html form post. I have multiple
rows in my form. This works just fine if I only have one row of data but
when I have multiple rows posted all I get as a result is one blank form.
Any suggestions on what I am missing??
Thank You,
Emmett Golde
html:
<form method="POST">
<table >
<tr>
<td>
<input type="text" name="name" value="emmett"/>
</td>
<td>
<input type="text" name="rank" value="2"/>
</td>
<td>
<input type="text" name="serialnumber" value="23456"/>
</td>
</tr>
<tr>
<td>
<input type="text" name="name" value="joe"/>
</td>
<td>
<input type="text" name="rank" value="5"/>
</td>
<td>
<input type="text" name="serialnumber" value="887654"/>
</td>
</tr>
</table>
<input type="submit" value="Submit Update">
</form>
XSL SHEET
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/">
<ROWSET>
<xsl:for-each select="request/parameters">
<ROW>
<FIELD1>
<xsl:value-of select="name"/>
</FIELD1>
<FIELD2>
<xsl:value-of select="rank"/>
</FIELD2>
<FIELD3>
<xsl:value-of select="serialnumber"/>
</FIELD3>
</ROW>
</xsl:for-each>
</ROWSET>
</xsl:template>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list