Subject: Re: [xsl] Block (container) - one line at the top and one at the bottom - how to achieve this ? From: "G. Ken Holman g.ken.holman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 20 Jan 2015 14:25:39 -0000 |
I'm trying to lay out a page which will eventually become a title page for some other documents.
One feature I want to achieve is a box containing two lines of text, one at the top and one at the bottom.
...
I've been advised that I can do this using display-align="after" in a block-container.
I can get the bounding box using a block-container, but I only seem to get the two lines together, either at the top or the bottom.
The description of display-align="after" says "The after-edge of the allocation-rectangle of the last child area is placed coincident with the after-edge of the content-rectangle of the reference-area." It doesn't say anything about the non-last child areas (ie "first line") so I expected these to be at the top of the block-container, with just the last one being at the bottom.
Any suggestions how to get this to work ?
<?xml version="1.0" encoding="US-ASCII"?><!--blockcont-split.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" xmlns="http://www.w3.org/1999/XSL/Format"> <block>This is a test line before the container</block> <!--the outer container can start lines from the top--> <block-container block-progression-dimension="5cm" border="solid 1pt"> <block>Top line of container</block> <!--the inner container can start lines from the bottom--> <!--the absolute position positions the inner within the outer--> <block-container absolute-position="absolute" display-align="after" block-progression-dimension="5cm"> <block>Bottom line of container</block> </block-container> </block-container> <block>This is a test line after the container</block> <block space-before="1em">The next page is full page size.</block> </flow> </page-sequence> <page-sequence master-reference="frame"> <flow flow-name="frame-body" xmlns="http://www.w3.org/1999/XSL/Format"> <!--the outer container can start lines from the top--> <block-container block-progression-dimension="100%"> <block>Top line of container</block> <!--the inner container can start lines from the bottom--> <!--the absolute position positions the inner within the outer--> <block-container absolute-position="absolute" display-align="after" block-progression-dimension="100%"> <block>Bottom line of container</block> </block-container> </block-container> </flow> </page-sequence> </root>
-- Check our site for free XML, XSLT, XSL-FO and UBL developer resources | Free 5-hour lecture: http://www.CraneSoftwrights.com/links/video.htm | Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ | G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx | Google+ profile: http://plus.google.com/+GKenHolman-Crane/about | Legal business disclaimers: http://www.CraneSoftwrights.com/legal |
--- This email has been checked for viruses by Avast antivirus software. http://www.avast.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Block (container) - one line , Kerry, Richard richa | Thread | Re: [xsl] Block (container) - one l, Kerry, Richard richa |
[xsl] Block (container) - one line , Kerry, Richard richa | Date | Re: [xsl] Block (container) - one l, Kerry, Richard richa |
Month |