[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: for-each issue

Subject: Re: for-each issue
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Thu, 27 Mar 2008 17:25:32 +0530
Re:  for-each issue
On 3/27/08, Z W <mpc8250@xxxxxxxxx> wrote:
> 1- Because this
> <td>
> code below is getting larger
> </td>
> how do I do a call-template and passing in with this variable cib_time_duration
> and perform its task there in another template ?
> I ask cuz I like to shorten the <td> section here.

You can refactor the code in <td> into another template. For e.g., as below:

<td>
   <xsl:call-template name="generateInfo">
      <xsl:with-param name="x" select="value" />
   </xsl:call-template>
</td>

<xsl:template name="generateInfo">
   <xsl:param name="x" />

   <!--
      Generate whatever info you want here.
   -->
</xsl:template>


> 2- l have several input xml files that would fill in this <td> section.
> Is it possibe in XSLT to determine which output to display based on
> a particular xml input file. Each of these input file would be going
> through the same for-each to find its timeSpan.

This seems like a normal control flow requirement, which should be
easy to solve. If you could tell the requirement in detail, we could
possibly suggest some way to solve it.


-- 
Regards,
Mukul Gandhi

Current Thread
  • Re: for-each issue, (continued)
      • Z W - 27 Mar 2008 09:55:04 -0000
        • Mukul Gandhi - 27 Mar 2008 10:32:23 -0000
        • Z W - 27 Mar 2008 10:40:23 -0000
        • Z W - 27 Mar 2008 10:53:10 -0000
        • Mukul Gandhi - 27 Mar 2008 11:55:51 -0000 <=
        • Z W - 27 Mar 2008 15:10:59 -0000
        • David Carlisle - 27 Mar 2008 15:18:27 -0000
        • Z W - 27 Mar 2008 15:43:58 -0000
        • XSL-List Owner - 27 Mar 2008 16:12:40 -0000

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.