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

Re: static header in fo:region-before

Subject: Re: static header in fo:region-before
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Sun, 15 Mar 2009 10:32:50 +0100
Re:  static header in fo:region-before
At 2009-03-14 16:25 -0700, Mark Wilson wrote:
None of the XSL-FO reference material I had at hand treated the problem of vertical alignment of static content in the region-before (except to say that I could not control the edges parallel to the edge of the paper) , so by Easter egging the properties, I hacked a solution for keeping the header content down a bit from the upper edge of the region-before.

A couple of approaches would have been more concise than you ended up using.


I found that the whitespace-collapse ="false" property had no effect (or I misunderstood its use), so I used a hard blank.

When you want "hard line" that isn't collapsed, use a space leader rather than a non-breaking space. I tell my students if the want the effect of the HTML:


<br/><br/>

... to just use:

<block><leader/></block>

... but I don't think the appropriate approach to your solution would be with such a "hard line".

You were getting close to one approach by using retained space, but you mistyped:

<fo:block space-after.conditionality="retain" space-after="0.25">

... note the length specification is missing a unit of measure, so it has no effect at all. Did you mean .25cm or .25in or something else? The above ends up having no effect.

Anyway, two questions.

(1) This has to be a common problem. Is there a better solution that I just could not find?

i - increase the upper page margin so that when the text lines up with the top of the region, that top is farther down the page ... the distance from the top of the page to the top of the header text is the same on every page regardless of the amount of header text


ii - use display-align="after" so that the text grows up from the bottom of the region ... this way the distance from the bottom of the header text and the top of the body text is the same on every page regardless of the amount of header text

iii - use a retained space-before on your header text:

  <fo:block text-align="center" space-before=".25in"
            space-before.conditionality="retain"
           >21st Century Index</fo:block>

(2) is there an XSL-FO cookbook similar to the O'Reilly XSLT Cookbook that treats XSL-FO problems? Or a website?

Not that I know of.


I hope this helps.

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

--
XQuery/XSLT/XSL-FO training in Los Angeles (New dates!) 2009-06-08
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
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

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.