|
Subject: Re: [xsl] position= and blocks (was And operator usage in XSL) From: "john farrow" <fomailinglist@xxxxxxxxxx> Date: Fri, 30 Jul 2004 09:11:57 +1200 |
Thats for the info Eliot.
I have been looking at this and came up with this to place the two blocks
over one another:
<fo:block id="outer">
<fo:block-container absolute-position="absolute">
<fo:block>A</fo:block>
</fo:block-container>
<fo:block>B</fo:block>
</fo:block>
I think (please correct me if I am wrong) only one block-container is
necessary, and it will be positioned relative to its containing area (with
id="outer") so the two blocks will be over each other, and only the second
fo:block is in the normal flow.
So the whole file to test this is:
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="front-page" margin="1.5cm"
page-height="297mm" page-width="210mm">
<fo:region-body region-name="body" margin="0.75cm 0.5cm 0.75cm 3cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="front-page" initial-page-number="1">
<fo:flow flow-name="body">
<fo:block>
<fo:block-container absolute-position="absolute">
<fo:block>A</fo:block>
</fo:block-container>
<fo:block>B</fo:block>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
Any thoughts ?
John
----- Original Message -----
From: "Eliot Kimber" <ekimber@xxxxxxxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Friday, July 30, 2004 8:58 AM
Subject: Re: [xsl] position= and blocks (was And operator usage in XSL)
> J.Pietschmann wrote:
>
> > john farrow wrote:
> >
> >> I have a question. If you don't use relative-position, how would you
> >> position one block over another, for instance if you wanted to
> >> position some
> >> text over an image, and you wanted this to occur in the normal flow on
a
> >> page ?
>
> My normal practice is to use two absolute-positioned block containers
> within another normally-positioned block container with
> relative-position="static". That is, the root block container
> establishes a new reference area and the two child block containers are
> then absolutely positioned with respect to their containing reference
> area (which is itself in the normal flow of blocks).
>
> Here's my test, which gives the same results with XSL Formatter 2.5 and
> XEP 3.77:
>
> <fo:block
> font-family="sans-serif"
> font-size="24pt"
> line-height="110%"
> space-before="12pt"
> >Test of overlayed blocks using nested absolutely-positioned
> block containers.
> </fo:block>
> <fo:block-container
> relative-position="static"
> absolute-position="auto"
> text-align="center"
> display-align="center"
> background-color="gray"
> inline-progression-dimension="2.5in"
> block-progression-dimension="2.5in"
> >
> <fo:block-container absolute-position="absolute"
> left="0pt"
> top="0pt"
> z-index="1"
> background-color="yellow"
> inline-progression-dimension="2in"
> block-progression-dimension="2in"
> border-style="solid"
> border-width="0.5pt"
> border-color="blue"
> ><fo:block>This is within a block container with z-index
> "1"</fo:block>
> </fo:block-container>
> <fo:block-container absolute-position="absolute"
> left="0.5in"
> top="0.5in"
> z-index="2"
> background-color="silver"
> inline-progression-dimension="1in"
> block-progression-dimension="1in"
> border-style="solid"
> border-width="0.5pt"
> border-color="green"
> ><fo:block>This is within a block container with z-index
> "2"</fo:block>
> </fo:block-container>
> </fo:block-container>
> <fo:block
> font-family="serif"
> font-size="26pt"
> line-height="110%"
> space-before="12pt"
> start-indent="0.5in">This is after the block
> containers.</fo:block>
> </fo:flow>
>
>
> --
> W. Eliot Kimber
> Professional Services
> Innodata Isogen
> 9030 Research Blvd, #410
> Austin, TX 78758
> (512) 372-8122
>
> eliot@xxxxxxxxxxxxxxxxxxx
> www.innodata-isogen.com
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] position= and blocks (was, Eliot Kimber | Thread | Re: [xsl] position= and blocks (was, Eliot Kimber |
| Re: [xsl] position= and blocks (was, Eliot Kimber | Date | Re: [xsl] position= and blocks (was, Eliot Kimber |
| Month |