Subject: Re: AW: [xsl] simple conditional looping From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 16 Aug 2004 11:41:40 -0400 |
my xml code is as follows: <orders> <order id="1">ABC</order> <order id="2">XYZ</order> <order id="3">QWE</order> </orders>
The orders tag will grow as and when new orders are added. Now in my stylesheet (PRINTER FRIENDLY) I need to display the orders as below.
ORDERS: 1. ABC 2. XYZ 3. QWE 4. ________ 5. ________ 6. ________ . . . . 50. _______
In my printer friendly stylesheet I need to display minimum 50 lines. If there are less then 50 orders then all the remaining lines will be blank with an underline. The transformed page (this xml and xsl will be transformed using ASP.NET) will be printed and the blank lines will be filled manually with a pen and Signed.
So I think conditional looping will be required.
<xsl:template match="orders"> <xsl:apply-templates select="order"/> <xsl:call-template name="write-blanks"> <xsl:with-param name="counter" select="50 - count(order)"/> </xsl:call-template> </xsl:template>
Cheers, Wendell
====================================================================== 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 ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: AW: [xsl] simple conditional lo, David Carlisle | Thread | Re: AW: [xsl] simple conditional lo, xptm |
RE: [xsl] Passing parameter into xs, Andrew Welch | Date | Re: AW: [xsl] simple conditional lo, xptm |
Month |