Hmm..
My intent is lost in trivial details :)...
Of course you can use a block inside a block and not use the of:inline.
What I was suggesting was to pad the content and not the block on top of it.
The processor does what you ask it do. The padding is applied to which ever
area scope you specify the padding parameters.
And Vasu's use of padding-left= does not make for a portable
Stylesheet in case the writing direction should change.
From my original mail , I suggested
<of:block>
<of:inline padding = "2pt"> text </of:inline>
</of:block>
Pointing that the padding is applied in the wrong container.
I agree to all the good implementation specific points suggested by Ken.
I am glad the problem is solved anyway!
Vasu Chakkera
Numerical Algorithms Group Ltd.
Oxford.
www.vasucv.com
-------Original Message-------
From: G. Ken Holman
Date: 18/11/2008 17:34:05
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] FO: block, padding and border
At 2008-11-18 18:16 +0100, Florent Georges wrote:
"G. Ken Holman" wrote:
Of course, the borders should be aligned. How would you do
that?
By using space-before= and space-after= for top and bottom, and
start-indent= and end-indent= for left and right.
Thanks for your detailed answer, Ken. Unfortunately, when I
try the following:
<of:block space-before="5pt" start-indent="5pt"
border="solid 0.5pt">
Bla bla...
</of:block>
I get the opposite result: the border is moved to the inside of
the block.
Sorry, I misinterpreted your original post that you were putting
These un-bordered blocks inside of bordered table cells because of
Your citation of tables.
When you are just using blocks outside of cells, the block with the
Border has a block inside with the content:
<of:block border="solid 0.5pt">
<of:block space-before="5pt" start-indent="5pt"
Space-after="5pt" end-indent="5pt">
Bla... Bla...
Thanks to Vasu, I found the following that solves my
problem:
<of:block padding-top="5pt" border="solid 0.5pt">
<of:inline padding-left="5pt">Bla bla...</of:inline>
</of:block>
With this, the border around the block is still aligned with
borders around tables, and the text is 5pt away from the border.
I am not sure this is the right way to go, but it seems clean
enough.
Fine ... But I insist padding is not the "clean way" to do it. And
If you get in the habit of using it you'll have issues with background.
And Vasu's use of padding-left= does not make for a portable
Stylesheet in case the writing direction should change.
And Vasu is attributing an inline area instead of a block area and I
Think it more appropriate to attribute the block area.
I use FOP 0.95, not sure this has something to do...
I don't have that installed, but my code fragment above works with
The processors I'm using.
.. . . . . . . . . . . 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(_at_)CraneSoftwrights(_dot_)com
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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--