<?xml version="1.0"?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" version="1.0" >



<xsl:template match="/">



<xsl:if test = "count(//move) &gt; 0">
<table width="100%" cellspacing="0" cellpadding="0">
	
	<xsl:variable name = "comentary" select = "//move[@m!=-1]" />
	
	<xsl:call-template name = "comentaryRow" >
		<xsl:with-param name="remaining-moves" select="$comentary" />		
	</xsl:call-template>
</table>
</xsl:if>


</xsl:template>




<xsl:template name="comentaryRow">
<xsl:param name="remaining-moves" />
<xsl:param name="movecnt">1</xsl:param>

	<tr>
		<td width="33%">
			<xsl:value-of select="$movecnt" />.&#160;<xsl:value-of select="$remaining-moves[1]" />&#160;<xsl:value-of select="$remaining-moves[2]" />
		</td>
		
		<xsl:choose>
			<xsl:when test="$remaining-moves[3]">
				<td width="33%">
					<xsl:value-of select="$movecnt + 1" />.&#160;<xsl:value-of select="$remaining-moves[3]" />&#160;<xsl:value-of select="$remaining-moves[4]" />
				</td>
				
				<xsl:choose>
					<xsl:when test="$remaining-moves[5]">
						<td width="33%">
							<xsl:value-of select="$movecnt + 2" />.&#160;<xsl:value-of select="$remaining-moves[5]" />&#160;<xsl:value-of select="$remaining-moves[6]" />
						</td>
					</xsl:when>
				  
					<xsl:otherwise>
						<td width="33%">&#160;</td>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
		  
			<xsl:otherwise>
				<td width="33%">&#160;</td>
				<td width="33%">&#160;</td>
			</xsl:otherwise>
		</xsl:choose>
	</tr>


	
	<xsl:if test = "$remaining-moves[7]">
		<xsl:call-template name = "comentaryRow" >
			<xsl:with-param name="remaining-moves" select="$remaining-moves[6]/following-sibling::node()" />
			<xsl:with-param name="movecnt" select="$movecnt + 3" />
		</xsl:call-template>
	</xsl:if>
</xsl:template>





</xsl:transform>