xsl-list
[Top] [All Lists]

Re: [xsl] Setting graphic alignments in two column page layout xsl fo

2011-05-30 15:33:56
On Mon, May 30, 2011 8:22 pm, Claudia Smith wrote:
Thanks for the suggestion.  I have tried this option, but it makes my
graphic float in the right of the column where the graphic exists.
My layout is always two column and whenever the graphic occurs, it
should go on the right column and the text below should go on the left
side column if there is space on the left column.

That's because floats are placed as children of "the nearest ancestor
reference-area of the anchor-area..." [1], i.e., of the
'span-reference-area' [2] from the column.

You can't really interpret the spec as allowing side-floats into the next
column.  You might try setting "left" on the fo:block in the fo:float, but
YMMV.

Could you please suggest some other trick I can use.

Put the graphic and the content for the left column in a fo:block [3] with
'span="all"' so it's inside a span-reference-area that spans both columns.
 This fo:block has to be a child of the fo:flow.  Put the text is a
fo:block with a "margin-right" large enough that the text has the same
width as a single column.  Good luck with getting the right amount of text
in the fo:block so that you don't end up with too much whitespace below
either the graphic or the text.

You might also try a fo:block-container [5] containing another
fo:block-container with 'absolute-position="fixed"' [7] and a large value
of 'left' containing the graphic and another fo:block for the text, but
even if this worked with your formatter and wasn't clipped (try
'overflow="visible" if so), then it would come out looking like the "weak"
example in http://www.w3.org/TR/xslfo20-req/#N66530 rather than the
"strong" example.

Regards,


Tony Graham                                   tgraham(_at_)mentea(_dot_)net
Consultant                                 http://www.mentea.net
Mentea       13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
 --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
    XML, XSL FO and XSLT consulting, training and programming

[1] http://www.w3.org/TR/xsl11/#fo_float
[2] http://www.w3.org/TR/xsl11/#fo_region-body
[3] http://www.w3.org/TR/xsl11/#fo_block
[4] http://www.w3.org/TR/xsl11/#span
[5] http://www.w3.org/TR/xsl11/#fo_block-container
[6] http://www.w3.org/TR/xsl11/#left
[7] http://www.w3.org/TR/xsl11/#absolute-position

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>