Hi Ken,
Once again a lucid explanation and taking the time to give me enough hints
so that I can get a better handle on learning what the properties do.
By the way, I spent the past two days re-writing the entire XSLT project
based on some of the tips you and Michael provided - the code is half its
old size and far less procedural than it was and has the distinct advantage
over the old code of actually working.
Mark
--------------------------------------------------
From: "G. Ken Holman" <gkholman(_at_)CraneSoftwrights(_dot_)com>
Sent: Sunday, March 15, 2009 2:32 AM
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: Re: [xsl] 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(_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>
--~--