[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Repeating a string
I would do something like this: <xsl:template match="some/node/selection"> <xsl:call-template name="repeater"> <xsl:with-param i="20"/> <xsl:with-param str="Hello"/> </xsl:call-template> </xsl:template> <xsl:template name="repeater"> <xsl:param name="i"/>0</xsl:param> <!-- defaul value--> <xsl:if test="$i > 0"> <xsl:call-template name="repeater"> <xsl:with-param i="$i - 1"/> <xsl:with-param str="$str"/> </xsl:call-template> <xsl:value-of select="$str"/> </xsl:if> </xsl:template> Cheers, Filipe PS: I have not tested this but I think it would work. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|