Subject: [xsl] XSL-FO absolute position problem From: "Robert Hansson" <Robert.Hansson@xxxxxxxxxx> Date: Fri, 22 Apr 2005 14:36:25 +0100 |
Hi all XSL-fo gurus. I am about to generate a complex diagram with connector lines between them to pdf, similar to a complex organisation diagram. We are using cocoon to serialize xml to pdf and I am fiddling around with testing to position elements absolute. It renders just fine using cocoon and also when using Stylus Studio. The problem is not that my test code does not render, but that the blocks are not absolute positioned. They are rendered relative to each other and lined up vertically. The question I can't answer is why? I can't really find any good examples where it actually works, so you guys are my only hope! It would be very nice if someone know what I am doing wrong or have an example to give me where it really works. Example: <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master page-height="279mm" page-width="216mm" margin top="10mm" margin-left="20mm" margin-right="20mm" margin-bottom="10mm" master-name="PageMaster"> <fo:region-before border-style="none" border-width="thin" extent="15mm"/> <fo:region-body border-style="none" border-width="thin" margin-top="20mm" margin-left="0mm" margin-right="0mm" margin-bottom="20mm"/> <fo:region-after border-style="none" border-width="thin" extent="15mm"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence initial-page-number="1" master-reference="PageMaster"> <fo:static-content flow-name="xsl-region-before"> </fo:static-content> <fo:flow flow-name="xsl-region-body"> <fo:block-container absolute-position="absolute" top="15mm" left="00mm" width="78mm" height="60mm" font-size="12pt" border-style="solid" border-color="#ff0000"> <fo:block font-weight="bold" space-after="1em">Absolute 1</fo:block> </fo:block-container> <fo:block-container absolute-position="absolute" top="15mm" left="100mm" width="67mm" height="40mm" font-size="12pt" border-style="solid" border-color="#ff0000"> <fo:block font-weight="bold" space-after="1em">Absolute 2</fo:block> </fo:block-container> <fo:block-container absolute-position="absolute" top="105mm" left="10mm" width="110mm" height="41mm" font-size="12pt" border-style="solid" border-color="#ff0000"> <fo:block font-weight="bold" space-after="1em">Absolute 3</fo:block> </fo:block-container> </fo:flow> </fo:page-sequence> </fo:root> Cheers, Rob. _____________________________________________________________________________ ____________________________________________ Internet communications are not secure and therefore Oyster Partners Ltd does not accept legal responsibility for the contents of this message. Any views or opinions presented are solely those of the author and do not necessarily represent those of Oyster Partners Ltd.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] grouping/position problem, Bruce D'Arcus | Thread | Re: [xsl] XSL-FO absolute position , Koba |
RE: [xsl] Working with multiple fil, Jim Neff | Date | Re: [xsl] grouping/position problem, M. David Peterson |
Month |