This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

xsl:fo table control question


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]