You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Roel Vanhout <ro...@riks.nl> on 2003/02/14 17:18:29 UTC

absolute-position vs position

Hello all,

Sorry if this is a faq, I couldn't find it anywhere.
I was looking for a solution for my absolute positioning with fop 
problem, and I found 
http://marc.theaimsgroup.com/?l=fop-user&m=102629332018796&w=2. That 
solved my problem, but I cannot find the 'position' attribute in the fo 
reference on zvon.org. My questions are as follows:
- Is it just the documentation on zvon.org that is missing, or is 
'position' fop-specific?
- Did I use absolute-position the wrong way? Here is a short sample, I 
used it like on http://www.dpawson.co.uk/xsl/sect3/fofixedposn.html:


<?xml version="1.0" encoding="iso-8859-1"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
   <fo:layout-master-set>
     <fo:simple-page-master master-name="my-page">
       <fo:region-body margin="1cm"/>
     </fo:simple-page-master>
   </fo:layout-master-set>

   <fo:page-sequence master-reference="my-page">
     <fo:flow flow-name="xsl-region-body">
       <fo:block-container   absolute-position="fixed"
                             top="0cm"
                             left="5cm"
                             right="8cm"
                             bottom="3cm">
       <fo:block font-size="8pt">Hello, world! Hello, world! Hello, 
world! Hello, world! Hello,
       world! Hello, world! Hello, world! Hello, world! Hello, world! Hello,
       world! Hello, world! Hello, world! Hello, world! Hello, world! Hello,
       world! Hello, world! Hello, world! Hello, world! Hello, world! Hello,
       world! Hello, world! Hello, world! Hello, world! Hello, world! Hello,
       world!</fo:block>
       </fo:block-container>
     </fo:flow>
   </fo:page-sequence>
</fo:root>


A related question: I tried both Fop and XEP on the file above. XEP 
rendered it with the text aligned to the top of the page, not leaving 
the margin="1cm" of the region-body. Isn't absolute-position relative to 
the parent element? Fop rendered it correctly, except that it did not 
respect the 'left="5cm"', it just aligned it to the left of the 
page-region.
I've tested all these things with Fop 0.20.5rc and Xep demo edition.
Thanks for all answers!

cheers,

roel




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: absolute-position vs position

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Roel Vanhout wrote:
> - Is it just the documentation on zvon.org that is missing, or is 
> 'position' fop-specific?
It's a shorthand. See
  http://www.w3.org/TR/xsl/slice7.html#position

> - Did I use absolute-position the wrong way?
This property is not yet implemented.

> A related question: I tried both Fop and XEP on the file above. XEP 
> rendered it with the text aligned to the top of the page, not leaving 
> the margin="1cm" of the region-body. Isn't absolute-position relative to 
> the parent element?

The term in the spec is "contining area". Perhaps XEP was confused
becuase you used margin="1cm" instead of margin-top="1cm". I'm
not sure whether the margin shorthand is even valid on region
definitions.

> Fop rendered it correctly, except that it did not 
> respect the 'left="5cm"', it just aligned it to the left of the 
> page-region.
Unless you use position="absolute" instead of absolute-position="fixed"
FOP ignores all positioning attributes.

J.Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org