[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Incrementing number in a for loop ??
Hi Ken, Thanks a mile. This is exactly what i was trying to do. Thanks !! Regards, Dipesh Date: Thu, 31 Jul 2003 10:41:43 -0400 From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Subject: RE: Incrementing number in a for loop ?? At 2003-07-31 09:44 -0400, Dipesh Khakhkhar wrote: >When i m parsing my xsl file i m creating quotes like this and it is >HARDCODED >and this I counted and put into my xsl file as show below where at >someplace i >need like this. > ><xsl:text> >``````````````````````````````</xsl:text> >And at other place i need something like this. ><xsl:text> >``````</xsl:text> >... >int quoteCount = 30; // for example this many quotes i need >for(int i = 0; i < quoteCount ; i++) > printf("`"); I hope this helps. ............ Ken T:\ftemp>type dipesh.xsl <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:template match="/"> <xsl:text>First is 30: </xsl:text> <xsl:call-template name="do-quotes"> <xsl:with-param name="count" select="30"/> </xsl:call-template> <xsl:text>
Second is only 20: </xsl:text> <xsl:call-template name="do-quotes"> <xsl:with-param name="count" select="20"/> </xsl:call-template> </xsl:template> <xsl:template name="do-quotes"> <xsl:param name="count" select="0"/> <xsl:if test="$count"> <xsl:text>'</xsl:text> <xsl:call-template name="do-quotes"> <xsl:with-param name="count" select="$count - 1"/> </xsl:call-template> </xsl:if> </xsl:template> </xsl:stylesheet> T:\ftemp>saxon dipesh.xsl dipesh.xsl First is 30: '''''''''''''''''''''''''''''' Second is only 20: '''''''''''''''''''' T:\ftemp> 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
|