Sebastien,
Hmmmm. Here's a piece of code which should work but, it creates an invalid PDF and generates [error] org.apache.fop.layout.BlockArea. I don't know why. You should be able to get the parent block's positions using the from-parent() function. And, I thought I'd done it successfully once.
Anyone with some clues?
Chuck Paussa
Sebastien Foucault wrote:
Thank's for that piece of advice but I'm rather looking for a solution allowing to position elements in a relative way.
The problem is that I want to design absolute-positionned blocks but, because I don't know the number of times a block will be repeated and hence it's Y position, I cannot use an absolute positionning.
Regards -- Sébastien Foucault
Chuck Paussa <[EMAIL PROTECTED]>
Sebastien,
They are on block-container. I don't know about block but here's some code I use:
<fo:block-container height="4.5in" width="7.2in" top="{$calcRemitBoxTop}mm" left="0in" position="absolute">
Chuck Paussa
Sebastien Foucault wrote:
Hello,
Are relative position attributes implemented in fop (either on block element or on block-container element) ?
If so how to make them work ?
Thank's in advance -- Sébastien Foucault
<?xml version="1.0" encoding="UTF-8"?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="simplet" page-width="240mm" page-height="100mm" margin-top="1in" margin-right="1in" margin-left="1in" margin-bottom="1in"> <fo:region-before extent="1in"/> <fo:region-body margin-top="1in"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="simplet"> <fo:static-content flow-name="xsl-region-before"> <fo:block>Region before </fo:block> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block>Region body Region body Region body Region body Region body Region body Region body Region body Region body Region body Region body Region body Region body Region body Region <fo:block-container height="5mm" width="10mm" left="from-parent(left)" top="from-parent(top)" position="absolute"> <fo:block>HELLO</fo:block> </fo:block-container> body Region body Region body Region body Region body Region body Region body Region body Region body Region body Region body Region body Region body </fo:block> </fo:flow> </fo:page-sequence> </fo:root>