<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" omit-xml-declaration = "yes" indent="yes" version="4.0"/>
	<!--
	ÎÄ×Ö¹ã¸æÄ£°å
	Copyright (C) 2004,2005 NiuTou.Net. All rights reserved.
	Written by niutou.net Lao Mi
	Web: http://www.niutou.net/,http://bbs.niutou.net/
	Email: root@niutou.net
	-->
<xsl:template  match="/">
<xsl:variable name="tdcount" select="xml/@tdcount"/>
<xsl:if test="$tdcount !=0">
<xsl:variable name="tdwidth"><xsl:value-of select="floor((100 div $tdcount))"/>%</xsl:variable>
<div style="margin-top:5px;border:1px solid #429CB4;" class="">
<table cellpadding="3" cellspacing="1" class="tableborder2" width="100%">
<xsl:call-template name="showrows">
<xsl:with-param name="tdwidth" select="$tdwidth"/>
<xsl:with-param name="positions" select="0"/>
<xsl:with-param name="tdcount" select="$tdcount"/>
</xsl:call-template>
</table></div>
</xsl:if>
</xsl:template>
<xsl:template name="showrows">
<xsl:param name="tdwidth"/>
<xsl:param name="positions"/>
<xsl:param name="tdcount"/>
<tr>
<xsl:for-each select="xml/text[position() &gt; $positions and position() &lt; ($tdcount+$positions+1)]">
		 	<td width="" class="tablebody1" height="20" style="text-align : center; "><xsl:value-of select="." disable-output-escaping="yes"/></td>
<xsl:if test=" position()=last() and $tdcount &gt; position()">	<td colspan="{$tdcount - position()}" class="tablebody1" height="20"></td></xsl:if>
</xsl:for-each>
</tr>
<xsl:if test="xml/text[position() &gt; ($tdcount+$positions)]">
<xsl:call-template name="showrows">
<xsl:with-param name="tdwidth" select="$tdwidth"/>
<xsl:with-param name="positions" select="$positions+$tdcount"/>
<xsl:with-param name="tdcount" select="$tdcount"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>