Subject: [xsl] Combining 2 template matches From: "Aaron Johnson" <artpunx@xxxxxxxxx> Date: Tue, 24 Oct 2006 18:56:38 +0100 |
I have a stylesheet that contains two template matches which outputs the results to two tables in html. I would like to combine the two so that I only have one table, with the output of the second template match appearing in the table cell marked "foo" thus rendering the second template / table redundant. I have tried replacing "foo" with a named template, but it didn't work.
<header/> <navigation> <focusedTab unremovable="true" immutable="true" ID="38" name="Home"/> <inactiveTab unremovable="true" immutable="true" ID="36" name="myDetails"/> <inactiveTab unremovable="true" immutable="true" ID="37" name="myMarks"/> <inactiveTab unremovable="true" immutable="true" ID="40" name="myEmail"/> <inactiveTab unremovable="true" immutable="true" ID="40" name="myTimetable"/> <inactiveTab unremovable="true" immutable="true" ID="41" name="Submit Coursework"/> </navigation>
<xsl:template match="header"> <a name="uweTop" id="uweTop"></a> <table class="headerNavigation" width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td> <!-- Header: This contains the myUWE logo and controls for logout etc --> <xsl:call-template name="headerTable"/> <!-- Header: Ends --> </td> <td align="right"><img src="{$mediaPathSkin}/transparent.gif" width="10" alt="" /></td> </tr> <tr> <td>"foo"</td> </tr> </table> </xsl:template>
<xsl:template match="navigation"> <table class="headerNavigation" cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td> <table class="headerNavigation" border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <xsl:apply-templates> <xsl:with-param name="type" select="'tab'"/> </xsl:apply-templates> </tr> </table> </td> </tr> </table>
<xsl:template name="test" match="navigation"> <table class="headerNavigation" border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <xsl:apply-templates> <xsl:with-param name="type" select="'tab'"/> </xsl:apply-templates> </tr> </table> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] recursive lists displayin, Joelle Tegwen | Thread | SV: [xsl] Combining 2 template matc, Per Osnes |
[xsl] recursive lists displaying gr, Joelle Tegwen | Date | Re: [xsl] XSLT 1.0: How to spit out, Mukul Gandhi |
Month |