Subject: table column
From: "Fei Zheng" <Fei.Zheng@xxxxxxx>
Date: Fri, 16 May 2003 16:08:19 -0400
|
I'd like to have a two column table to look like
item1 item2
item3 item4
item5 item6
but the output from the following code always gives an empty cell like
item1
item2
item3
item4
item5
item6
<xsl:template match="item">
<xsl:variable name="current-node" select="position()"/>
<table>
<tr>
<td>
<xsl:for-each select=".">
<xsl:if test="($current-node mod 2 > 0) ">
<xsl:apply-templates select="content"/>
</xsl:if>
</xsl:for-each>
</td>
<td>
<xsl:for-each select=".">
<xsl:if test="($current-node mod 2 = 0) ">
<xsl:apply-templates select="content"/>
</xsl:if>
</xsl:for-each>
</td>
</tr>
</table>
</xsl:template>
Is there a way to get the correct column layout? Thanks!
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- table column
- Fei Zheng - Fri, 16 May 2003 16:08:56 -0400 (EDT) <=
- <Possible follow-ups>
- Fei Zheng - Mon, 19 May 2003 09:36:29 -0400 (EDT)
- David Neary - Mon, 19 May 2003 10:12:00 -0400 (EDT)
|
|