[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XSL-FO absolute position problem

Subject: XSL-FO absolute position problem
From: "Robert Hansson" <Robert.Hansson@xxxxxxxxxx>
Date: Fri, 22 Apr 2005 14:36:25 +0100
xsl fo absolute position
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.