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

xsl:fo table control question

Subject: xsl:fo table control question
From: "Khalid"<k_ali@xxxxxxxxxxxxxxx>
Date: Tue, 5 Feb 2002 20:34:53 GMT
xsl fo table
Hello,I have just started experimenting xsl:fo,I was wondering if some one could
guide me with problem.
the data I am working with,comes from the db in xml format.My question is I
guess how to manage the data in a way that should it span beyond the limits
of one page,it goes to the page 2,but if the data withing a certain table is
not that much to span on multiple pages,then only one <fo:table-row> must appear
on  a page and the next table-row section should go to the next page.

below is the code I have ,hopefully it will elaborate a little more about my
wuestion.

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<fo:layout-master-set>
		<fo:simple-page-master master-name = "multi_table_test">
			<fo:region-body region-name="body" margin-top="3pc" margin-bottom="10pc"
margin-left="1pc" margin-right="1pc"/>
			<fo:region-before region-name="header" extent="2pc"/>
		</fo:simple-page-master>
	</fo:layout-master-set>
	
	<fo:page-sequence master-name = "multi_table_test">
		<fo:flow flow-name = "body">
			<fo:table background-color="#FDFBD5" padding-left="2px" padding-right="2px"
padding-bottom="2px" padding-top="0px" margin-left="0px" margin-right="0px"
margin-bottom="0px" margin-top="0px" border-color="#93BEE2" border-style="solid"
border-left-width="1px" border-right-width="1px" border-bottom-width="1px" border-top-width="1px"
width="565pt">
				<fo:table-body>
					<fo:table-row  font-weight="bold"><!-- This row is created once to create
the top headers -->
						<fo:table-cell>
							<fo:block>
								Description
							</fo:block>
						</fo:table-cell>
						
						<fo:table-cell>
							<fo:block>
								Code			
							</fo:block>
						</fo:table-cell>
						
						<fo:table-cell>
							<fo:block>
								Amount Owing
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					
					<fo:table-row> <!-- this is created dynamically depending upon the results
in the database -->
						<fo:table-cell>
							<fo:block>
								Company 1
							</fo:block>
						</fo:table-cell>
						
						<fo:table-cell>
							<fo:block>
								PL100A6T
							</fo:block>
						</fo:table-cell>
						
						<fo:table-cell>
							<fo:block>
								124.35
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					
					<fo:table-row> <!-- this is created dynamically depending upon the results
in the database.this where I want to have a control of some sort.that will determins
that if theere isn't more data in this segment then create next table-row in
the next page -->
						<fo:table-cell>
							<fo:block>
								Company 2
							</fo:block>
						</fo:table-cell>
						
						<fo:table-cell>
							<fo:block>
								PL101M6Z
							</fo:block>
						</fo:table-cell>
						
						<fo:table-cell>
							<fo:block>
								9678.55
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					
				</fo:table-body>
			</fo:table>
		</fo:flow>
	</fo:page-sequence>
</fo:root>

Thanks

 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.