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

table column

Subject: table column
From: "Fei Zheng" <Fei.Zheng@xxxxxxx>
Date: Fri, 16 May 2003 16:08:19 -0400
select from table column like
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 &gt; 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)

PURCHASE STYLUS STUDIO ONLINE TODAY!

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

Buy Stylus Studio Now

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-2013 All Rights Reserved.