Bug 43709 - provisional-distance-between-starts causes unnecessary margin for nested tables
Summary: provisional-distance-between-starts causes unnecessary margin for nested tables
Status: CLOSED INVALID
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: fo tree (show other bugs)
Version: trunk
Hardware: Other other
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-26 09:53 UTC by Isaac Shabtay
Modified: 2012-04-01 13:51 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Isaac Shabtay 2007-10-26 09:53:02 UTC
As always, the best way to explain is by example...

The following XSL-FO has a list-block with provisional-distance-between-starts
defined. The list item inside it owns a table.

For some reason, each cell in the table has a left-padding equal to the value of
the enclosing provisional-distance-between-starts:

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<fo:layout-master-set>
		<fo:simple-page-master margin-left="0.75in" margin-right="0.75in"
master-name="letter" page-height="11in" page-width="8.5in">
			<fo:region-body margin-bottom="1.0cm" margin-top="0.5cm" />
		</fo:simple-page-master>
	</fo:layout-master-set>
	<fo:page-sequence master-reference="letter">
		<fo:flow flow-name="xsl-region-body" font-size="9pt">
			<fo:list-block provisional-distance-between-starts="3.0em"
provisional-label-separation="0">
				<fo:list-item space-before="1.0em">
					<fo:list-item-label end-indent="label-end()">
						<fo:block>1.</fo:block>
					</fo:list-item-label>
					<fo:list-item-body start-indent="body-start()">
						<fo:block font-weight="bold">Item 1</fo:block>
						<fo:block font-size="0.8em" space-before="1.0em">
							<fo:table table-layout="fixed" width="100%">
								<fo:table-column border="thin solid black" column-width="100%" />
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell>
											<fo:block font-weight="bold" padding-bottom="1.0em">Title 1</fo:block>
											<fo:block>Text 1</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</fo:table-body>
							</fo:table>
						</fo:block>
					</fo:list-item-body>
				</fo:list-item>
			</fo:list-block>
		</fo:flow>
	</fo:page-sequence>
</fo:root>
 
Expected result: Left-padding of the table-cells should be 0. The setting of
provisional-distance-between-starts shouldn't affect the padding of the cells.

Tested with rev-588275.
Comment 1 Jeremias Maerki 2007-10-27 01:15:36 UTC
I'm afraid you've stepped into the indent-inheritance trap. The whole topic
about indent inheritance is explained here:
http://wiki.apache.org/xmlgraphics-fop/IndentInheritance

For readers in a hurry: Simply reset start-indent and end-indent on the
fo:table-body (and table-header/footer if necessary) element. A table creates
reference areas and that's why it can appear that indents are applied twice. So,
no, it's not a bug. The XSL-FO spec is a little peculiar in this aspect. Some
commercial implementors have chosen a different path (which we support, too: see
"break-indent-inheritance" in [1]) but it breaks the spec and therefore
shouldn't be used in the interest of long-term interoperability.


[1] http://xmlgraphics.apache.org/fop/0.94/configuration.html#general-elements
Comment 2 Glenn Adams 2012-04-01 13:51:02 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs