In 2.0, do
<xsl:for-each select="1 to $n"><td/></xsl:for-each>
In 1.0, do
<xsl:template name="multi-td">
<xsl:param name="n"/>
<xsl:if test="$n > 0">
<td/>
<xsl:call-template name="multi-td">
<xsl:with-param name="n" select="$n - 1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
then:
<xsl:call-template name="multi-td">
<xsl:with-param name="n" select="5"/>
</xsl:call-template>
Your mistake was putting a <td/> element as a child of call-template. The only thing allowed here is <xsl:with-param>.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference