Subject: Re: [xsl] need a hint on matching table cells From: "J.Pietschmann" <j3322ptm@xxxxxxxx> Date: Thu, 18 Jul 2002 01:02:22 +0200 |
<xsl:template match="T-BODY/ROW"> <tr> <xsl:if test="CELL/@SPAN = 'grey'"> <td colspan="2" class="grey"><xsl:apply-templates select = "CELL" /></td>
First: the test is true if there is *at least one* CELL with a @SPAN='grey' in the row. Furthermore you are matching *all* CELL elements here. Therefore you get one <td> with the content of all CELL elements in it. The next xsl:if matches too, and you get another td etc.
Probably you want <xsl:template match="T-BODY/ROW"> <tr> <xsl:apply-templates/> </tr> </xsl:template>
<xsl:template match="CELL[@SPAN = 'grey']"> <td colspan="2" class="grey"> <xsl:apply-templates/> </td> </xsl:template>
<xsl:template match="CELL[@SPAN = 'lightgrey']"> <td colspan="2" class="lightgrey"> <xsl:apply-templates/> </td> </xsl:template>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] need a hint on matching table, Brad Miller | Thread | Re: [xsl] need a hint on matching t, Charles Knell |
Re: [xsl] plain text output, Thomas B. Passin | Date | RE: [xsl] need a hint on matching t, Conal Tuohy |
Month |