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

Re: "Merging" space-before

Subject: Re: "Merging" space-before
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 29 Apr 2011 12:11:40 -0400
Re:  "Merging" space-before
At 2011-04-29 15:34 +0000, Fredrik Bengtsson wrote:
I've been trying to wrap my head around "4.3 Spaces and Conditionality" in the XSL spec, but I'm a bit confused.

I think you've got it right.


What I'd like to have is a block A which may or may not have a nested block B inside it (actually a title inside a chapter wrapper). A itself has a space-before of 6pt, and with no B inside, that's what will separate stuff before A from other things inside A. B has a space-before of 18pt, and when it is present I want the total space between stuff before A and B itself to be 18pt, not 18+6pt. That is, I want their spaces to overlap such that the greater one wins. How do I do that?

Ummmmmm ... *that's* the specification! You are only supposed to get 18pt in your situation.


Space-before is *not* a command to be executed, but rather, it is a condition to be met.

The condition of space-before="6pt" is satisfied by the space-before="18pt", thus you should only have 18pt.

In Antenna House, the example below of four columns gives me 18pt difference in the first, 18pt difference in the second, 6pt difference in the third and 24pt difference in the fourth.

Just like the spec says.

I hope this helps.

. . . . . . . . . . . Ken

<?xml version="1.0" encoding="US-ASCII"?><!--frederik.fo-->
<root xmlns="http://www.w3.org/1999/XSL/Format"
      font-family="Times" font-size="20pt">

  <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>
        <table-body>
          <table-cell>
            <block>This is a test</block>
            <block space-before="18pt">
              No nested block.
            </block>
          </table-cell>
          <table-cell>
            <block>This is a test</block>
            <block space-before="18pt">
              <block space-before="6pt">
                Nested block.
              </block>
            </block>
          </table-cell>
          <table-cell>
            <block>This is a test</block>
            <block space-before="18pt">
              <block space-before="6pt" space-before.precedence="force">
                Nested block nested force attribute.
              </block>
            </block>
          </table-cell>
          <table-cell>
            <block>This is a test</block>
            <block space-before="18pt" space-before.precedence="force">
              <block space-before="6pt" space-before.precedence="force">
                Nested block both force attributes.
              </block>
            </block>
          </table-cell>
        </table-body>
      </table>
    </flow>
  </page-sequence>
</root>


-- Contact us for world-wide XML consulting & instructor-led training Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Legal business disclaimers: http://www.CraneSoftwrights.com/legal

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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