ACC SHELL
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="common.xsl"/>
<xsl:template match="/page">
<p>Hello, this is small forum.</p>
<h2>Existing comments</h2>
<xsl:choose>
<xsl:when test='count(comment) > 0'>
<xsl:for-each select='comment'>
<hr />
<p><b>Name: <xsl:value-of select='@name'/></b></p>
<xsl:if test='email != ""'>
<p><b>
Email: <xsl:copy-of select='email/node()'/>
</b></p>
</xsl:if>
<p><xsl:copy-of select='message/node()'/></p>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<hr />
<p>Sorry, currently no comments.</p>
</xsl:otherwise>
</xsl:choose>
<hr />
<h2>New comment</h2>
<form action='do_add_comment.php' method='post'>
<table>
<tr>
<th>Name</th>
<td>
<input type='text' name='name'></input>
</td>
</tr>
<tr>
<th>Email</th>
<td>
<input type='text' name='email'></input>
</td>
</tr>
<tr>
<th>Comment message</th>
<td>
<textarea cols='50' rows='5' name='message'></textarea>
</td>
</tr>
<tr><td><input type='submit' /></td></tr>
</table>
</form>
</xsl:template>
</xsl:stylesheet>
ACC SHELL 2018