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

Re: FO: block, padding and border

Subject: Re: FO: block, padding and border
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 18 Nov 2008 11:39:42 -0500
Re:  FO: block
At 2008-11-18 16:58 +0100, Florent Georges wrote:
  I have a form in FO, which is a sequence of blocks and tables,
each with a border.  Within blocks, I use padding="2pt" to
prevent words to touch the border.  But doing so, the border of
the block is moved by 2pt (to the outside of the block.)

Right ... check out my book you bought on pages 92 and 95.

  You can see the following screenshot to see the result:

  Of course, the borders should be aligned.  How would you do

By using space-before= and space-after= for top and bottom, and start-indent= and end-indent= for left and right.

I can think about workarounds, like using a table with
one cell instead of a block, but I would like to do it the clean

In XSL-FO using padding is rarely the "clean way" ... in fact I've never been forced to use it in my production work ... and it has repercussions when playing with backgrounds (the background of padding is the background of the child object, not the background of the parent).

The diagram on page 92 shows the use of start-indent=, end-indent=, space-before= and space-after= ... the diagram on page 95 shows the use of padding and borders.

Note when using space-before= and space-after= that you are at the start and end of a reference area (the table cell), so you need to specify a conditionality of retain.

I hope this helps.

. . . . . . . . . Ken

Upcoming XSLT/XSL-FO, UBL and code list hands-on training classes:
:  Sydney, AU 2009-01/02; Brussels, BE 2009-03; Prague, CZ 2009-03
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video sample lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg
Video course overview:  http://www.youtube.com/watch?v=VTiodiij6gE
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Current Thread


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.
First Name
Last Name
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.