/ Published in: XSLT
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<xsl:call-template name="loop"> <xsl:with-param name="cycles" select="5"/> <xsl:with-param name="Tag" >td</xsl:with-param> </xsl:call-template> <xsl:template name="loop"> <xsl:param name="cycles" /> <xsl:param name="Tag" /> <xsl:choose> <xsl:when test="number($cycles) > 0"> <xsl:element name="{$Tag}">blank</xsl:element> <xsl:call-template name="loop"> <xsl:with-param name="cycles" select="number($cycles)-1" /> <xsl:with-param name="Tag" > <xsl:value-of select="$Tag"/> </xsl:with-param> </xsl:call-template> </xsl:when> </xsl:choose> </xsl:template>