xsl-list
[Top] [All Lists]

RE: add new line to an html table with xsl

2003-03-18 03:37:10
Hi,

i would like to create a button in my html page which allows 
the user to
add new lines to its html table. I would like to code this in xsl by
using an if condition and a variable declaration:

<xsl:variable name="newLine">
 <td>
  <input border="0" name="toto" size="10" type="text" />
</td>
</xsl:variable>

<table>
.....
<xsl:if "test=...">
 <xsl:copy-of  select="$newLine"/>
</xsl:if>

</table>

How is the button supposed to work? Will it run the XSLT transformation on the 
client using ECMAScript, or will it call some service on the server that return 
the document with a new row? Your XSLT looks correct, but you have to specify 
where will the transformation take place. Anyhow, I'd suggest using DOM for 
this.

Cheers,

Jarno - This Morn'Omina: One Eyed Man

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list