Re: [xsl] absolute position fo:block to attain magazine like layout

Subject: Re: [xsl] absolute position fo:block to attain magazine like layout
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 12 Nov 2002 13:14:09 -0500
At 2002-11-12 10:50 -0600, W. Eliot Kimber wrote:
G. Ken Holman wrote:
At 2002-11-12 09:23 -0500, Noel Golding wrote:

Is it possible to position a block in an exact location and have the rest of
the text flow around it?
example. I have a two column newsletter and I would like to put a callout
box in the middle of the page.

This is not available in XSL-FO 1.0.
A side float will allow you to put an image at one end of the line or the other, and the text will go around it, but there is no construct that can be placed arbitrarily on a page and have other content flow around it.

It just occurred to me that you could possibly fake this if you know the exact geometry of everything:

When I had considered this, I thought of a flaw ...


1. Position your main block absolutely as a block-container. Set the z-index to a large number to ensure it's positioned on top.

I think the z-index should be immaterial since we are avoiding writing in the area. Remember that the z-index only determines what is on top of all of the things at a given place on the page, all of which are still visible. So the flaw isn't here.


2. In the start-side column, use an edge-ward side float whose extent will equal that part of the absolute block that would impinge on the column.

I think this could not be positioned vertically in the column ... there would be no way of guaranteeing when to start the side float. The side float goes to the side of the block where the side float is flowed, so you would have to ensure to do so only when you are flowing information at the middle of the page.


XSL-FO 1.0 doesn't have any synchronization constructs or ways to determine how far down a column one has been, in order to position the side float.

At least I'm pretty sure it cannot be done, but, Eliot, you've managed magic in the past.

3. Ditto for the end-side column with a start-ward float.

Ditto for that column as well.


This should work, but I haven't tried it yet. I will when I get a chance.

I would love to hear that it does work, but I don't think it will so I have never bothered to try.


I hope this helps.

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


-- Upcoming hands-on in-depth XSLT/XPath and/or XSL-FO: - North America: Feb 3 - Feb 7,2003

G. Ken Holman               mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.        http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0  +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                     Definitive XSLT and XPath
ISBN 0-13-140374-5                             Definitive XSL-FO
ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath
ISBN 1-894049-10-1             Practical Formatting Using XSL-FO
Next conference training:                    2002-12-08,03-03,06


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread