[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: AW: simple conditional looping
At 12:19 PM 8/16/2004, you wrote:
But that will have troubles is there is more than 50 order... Not if you construct the recursive template correctly. Passing it a negative number as a parameter (let's say you have 55 orders: the parameter passed will be (50 - 55) = -5), you can easily "fall through" and choose not to emit output or recurse: <xsl:template name="write-blanks"> <xsl:param name="counter" select="0"/> <xsl:if test="$counter > 0"> ... write your blank line here ... <xsl:call-template name="write-blanks"> <xsl:with-param name="counter" select="$counter - 1"/> </xsl:call-template> </xsl:if> </xsl:template> Cheers, Wendell Citando Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>: ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|
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
|