[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
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
|