This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
newbie - table cell spanning rows
- To: XSL-List at lists dot mulberrytech dot com
- Subject: [xsl] newbie - table cell spanning rows
- From: amit dot pherwani at census dot gov
- Date: Thu, 26 Jul 2001 13:58:32 -0400
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi,
I'm fairly new to FOP 0.18.1 so I apologize if this question looks stupid
but I couldn't find any info in the FAQ's.
I'm trying to generate a table which looks like this
------------------------------------------------------------------------------------------------------------------------------------------------
State | Type 1 | Type 2 |
|-----------------------------------------------------------------------------------------------------------------------|
County |SubType1 |SubType2 |SubType3 |SubType4 |SubType5
|
------------------------------------------------------------------------------------------------------------------------------------------------|
Costs |100 | 200 |300 |125
|124 |
Sales |200 |300 |300 |145 |100
|
-------------------------------------------------------------------------------------------------------------------------------------------------
i.e the State-County column needs to span 2 rows, Type 1 spans 3 columns
and Type 2 spans 2 columns
Also, blank lines need to be inserted between every 4th row.
Finally, the row-items "costs" and "sales" need to be indented by 3 pixels.
The fo file I'm using to generate this is given below.
Questions :
1. The "number of rows spanned" attribute does not actually work the way I
intended, instead I get the following error when I run the fo file thru the
FOP program:
formatting FOs into areas
[1WARNING: Number of cell columns under table-row not equal to number of
table
columns
and the entire "SubType" row is eliminated in the final PDF output
2. How do I insert blank rows in the table. Using
<fo:table-row>
<fo:table-cell border-style="solid" number-rows-spanned="6">
<fo:block> </fo:block>
</fo:table-cell>
</fo:table-row>
yields a reverse-highlighted blank line which looks like a really big table
border, not a blank white line like I need
3. How do I indent the cell values (Sales, Costs) by a specific number of
blank spaces?
Would really appreciate some help on this.
Thanks,
amit
***********************************************************************
FO file :-
<fo:table-column column-width="5cm"/>
<fo:table-column column-width="1.5cm"/>
<fo:table-column column-width="1.5cm"/>
<fo:table-column column-width="1.5cm"/>
<fo:table-column column-width="1.5cm"/>
<fo:table-column column-width="1.5cm"/>
<fo:table-row>
<fo:table-cell border-style="solid" number-rows-spanned="2">
<fo:block>State </fo:block>
<fo:block>County </fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="3" text-align="center"
number-rows-spanned="1">
<fo:block>Type 1 </fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="2" text-align="center">
<fo:block>Type 2 </fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell number-columns-spanned="1" >
<fo:block >SubType 1</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1" >
<fo:block >SubType 2</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1" >
<fo:block >SubType 3</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1" >
<fo:block >SubType 4</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1" >
<fo:block >SubType 5</fo:block>
</fo:table-cell>
</fo:table-row>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list