Re: [xep-support] padding vs. space, default conditionality?

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Fri Nov 23 2007 - 12:01:02 PST

At 2007-11-23 13:42 +0100, Kurt Spescha wrote:
>The default behaviour of padding-after.conditionality should be
>'discard' and of space-after.conditionality should be 'retain' on
>page-breaks as to your documents.

I'm not sure why you are saying that conditionality is different on a
per FO basis. I understand the initial value to always be
"discard". But there are other factors involved in the determination.

>Having testing it, it seams to be the other way round. See attached
>fos (I've changed the textes from the original fo - now it's only
>latin blabla). One with space-after the other with padding-after. If
>the background is coloured, you'll see the difference.

Sorry ... I'm afraid I cannot quickly find which constructs you are
referring to, so I wrote a test of my own.

>The goal is to use padding,

I'm curious why ... I tell my students they should be using
spacing. The only reason I can think to use padding is that the
colour of the background that shows through for padding is that of
the child area, while the colour of the background that shows through
for spacing is that of the parent area.

What is it about padding that you feel it is necessary to use it, and
have you considered the differing background issue?

>but the padding should be discarded on page-breaks and at the end or
>top of a page. What I doing wrong or am I misunderstanding the
>default definitions?

Below my sig is the fragment I'm using for testing. I've placed the
border before and padding before of blocks "2c" and "2f" at the top
of the main reference area of the body region.

I figure this is an appropriate test as I'm comparing the
conditionality of the width of the before border with the
conditionality of the before padding, both of which are at the top of
the reference area.

The block distinguished by "2c" properly discards the border before.

The block distinguished by "2f" properly retains the border before.

In both cases the padding is retained and not discarded. One would
think it, too, would be discarded for "2c", but I think I've
convinced myself that the specification requires it to stay.

XSL-FO 1.1. sections 7.8.9 and 7.8.31 both use the same terminology,
including the default to be "discard". Note there is additional text
for the length-conditional trait of the before-border-width= that is
not found in that of section for padding-before=. I think this is a clue.

Reading section 4.3 Spaces and Conditionality backs up the statement
in both 7.8.9 and 7.8.31 that conditionality is for those areas where
"is-first" trait is set to _false_ (I would have guessed for _true_
but the specification is consistent in that it is only for areas
where it is _false_).

That is why the additional text is needed for border-before-width to
counteract this "is-first" constraint.

I figure the area "2c" has an is-first trait is _true_, so padding
cannot be discarded according to the spec, and the additional text is
necessary for border-before-width in order to discard the border-before.

And I cannot think of a way of creating a block area with padding
where the area is _not_ the first of the areas created by the
formatting object.

So I think you are out of luck ... my analysis of your situation is
that the padding stays ... again, is there a reason you cannot use spacing?

I hope this is considered helpful.

. . . . . . . . . Ken

<?xml version="1.0" encoding="utf-8"?><!--test.fo-->
<root xmlns="http://www.w3.org/1999/XSL/Format"
       font-family="Times" font-size="40pt">

   <layout-master-set>
     <simple-page-master master-name="frame"
                         page-height="297mm" page-width="210mm"
                         margin-top="15mm" margin-bottom="15mm"
                         margin-left="15mm" margin-right="15mm">
       <region-body region-name="frame-body"/>
     </simple-page-master>
   </layout-master-set>

<page-sequence master-reference="frame">

<flow flow-name="frame-body">

   <table break-before="page">
     <table-body>
       <table-row>
         <table-cell border-before-width="10pt" border-before-style="solid">
           <block padding-before="80pt">test of padding1a (discard)</block>
           <block padding-before="80pt">test of padding2a (discard)</block>
         </table-cell>
       </table-row>
       <table-row>
         <table-cell border-before-width="10pt" border-before-style="solid">
           <block padding-before="80pt">test of padding1b (discard)</block>
           <block padding-before="80pt">test of padding2b (discard)</block>
         </table-cell>
       </table-row>
       <table-row>
         <table-cell border-before-width="10pt" border-before-style="solid">
           <block padding-before="80pt">test of padding1c (discard)</block>
           <block padding-before="80pt">test of padding2c (discard)</block>
         </table-cell>
       </table-row>
     </table-body>
   </table>
   <table break-before="page">
     <table-body>
       <table-row>
         <table-cell border-before-width.conditionality="retain"
border-before-width="10pt" border-before-style="solid">
           <block padding-before="80pt"
padding-before.conditionality="retain">test of padding1d (retain)</block>
           <block padding-before="80pt"
padding-before.conditionality="retain">test of padding2d (retain)</block>
         </table-cell>
       </table-row>
       <table-row>
         <table-cell border-before-width.conditionality="retain"
border-before-width="10pt" border-before-style="solid">
           <block padding-before="80pt"
padding-before.conditionality="retain">test of padding1e (retain)</block>
           <block padding-before="80pt"
padding-before.conditionality="retain">test of padding2e (retain)</block>
         </table-cell>
       </table-row>
       <table-row>
         <table-cell border-before-width.conditionality="retain"
border-before-width="10pt" border-before-style="solid">
           <block padding-before="80pt"
padding-before.conditionality="retain">test of padding1f (retain)
with more than one line area created by the block.</block>
           <block padding-before="80pt"
padding-before.conditionality="retain">test of padding2f (retain)</block>
         </table-cell>
       </table-row>
     </table-body>
   </table>

</flow></page-sequence></root>

--
Comprehensive in-depth XSLT2/XSL-FO1.1 classes: Austin TX,Jan-2008
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/f/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Fri Nov 23 12:51:58 2007

This archive was generated by hypermail 2.1.8 : Fri Nov 23 2007 - 12:52:00 PST