On 24 May 2011, at 19:39, Andreas L. Delmelle wrote:

> On 24 May 2011, at 13:55, Theresa Jayne Forster wrote:
>> I am trying to do a multi section document where I have a “container” with 
>> absolute position and then the contents of the “container” are generated 
>> from a template call in the xsl to the same bit of code but with different 
>> contents, I have tried to use position=”relative” but it doesn’t seem to do 
>> as I would expect it to…
>> <snip />
> 
> If you use position="absolute" on the inner container as well, it should work 
> as you expect, IIUC (?)
> In that case, the (0,0) coordinate for the inner container is then determined 
> relative(!) to the containing reference area, which is that of the outer 
> container.

I suddenly realized this may have come across as confusing, so just thought I'd 
provide some further background on this:
The "position" property is actually a shorthand, included in XSL-FO mainly for 
CSS compatibility. It maps to the native "absolute-position" and 
"relative-position" properties. 
(http://www.w3.org/TR/xsl/#absolute-position and #relative-position)

One is implemented in FOP, the other is not, yet.
(http://xmlgraphics.apache.org/fop/compliance.html)

However, as pointed out, I believe you can solve your problem with 
absolute-position only, which _is_ supported. That is, unless I misunderstood 
your question (?)
If the inner container is a child of the outer container, then 
relative-position would have virtually the same effect as absolute (except if 
there is content in the outer container, that  follows the inner container 
*and* should be normally stacked...)

The biggest difference between the two, is that block-containers with relative 
position remain part of the normal flow. They are only offset by the specified 
amounts during rendering. Their accumulated height still influences the layout 
of the following objects. 
Absolute-positioned containers, OTOH, are 'pulled' out of the flow, so to 
speak. The layout for the object after that container would just continue on 
the next line (= right after the content of the preceding sibling of the 
container).

Also, just to manage expectations, note that an absolute-positioned container's 
content does not flow from one page to the next. Rather, the overflow, if any, 
will be handled in accordance with the 'overflow' property.
From the Rec.:
"The following additional restrictions apply for paged presentations:
   * Only objects with absolute-position="auto" may have page/column breaks."
   * For other values any keep and break properties are ignored."



Regards

Andreas
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to