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

Ho do you format arbitrary data into tables?

Subject: Ho do you format arbitrary data into tables?
From: Dan Vint <dvint@xxxxxxxxxxxxxx>
Date: Mon, 21 Jul 2003 08:51:00 -0700
arbitrary data what
I have a list of data, that might be 3 items long or 100. Instead of a list I want to put this into an HTML or FO table where I have 3 columns and as many rows as is needed. I have a for-each that selects all the items that I want and I know what the markup is to generate, but I'm having troubles coming up with a solution for inserting the row start and end tags.

This is an example of what I'm doing:
<table>
<xsl::for-each select="item">
	<td><xsl:value-of select="."/></td>
</xsl:for-each>
</table>

How do I get a counter inside that allows me to insert the appropriate start or end tag? Is there an easy way to force for-each to work with X number of items at a time (give me a nodeset of X items) that I could then process?

I've got an HTML hack that allows me to enter just an empty <tr/> element, but that is relying on bad HTML to make this work, also my ultimate goal is to generate FO tables for PDF output.

Any ideas appreciated.

..dan



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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.