[xsl] XSL-FO alignment

Subject: [xsl] XSL-FO alignment
From: "Kamal Bhatt" <kbhatt@xxxxxxxxx>
Date: Thu, 4 May 2006 00:09:15 +1000 (EST)
Hi
I am new to FO, so bare with me.

I have the following XSL-FO script:

<?xml version="1.0"?>

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  <fo:layout-master-set>
    <fo:simple-page-master page-width="21cm" page-height="29.7"
master-name="all">
      <fo:region-body margin-left="2.54cm" margin-right="2.54cm"
                      margin-bottom="2.54cm" margin-top="2.54cm"/>
      <fo:region-before extent="1.27cm" />
      <fo:region-after extent="1.27cm" />
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="all">
    <fo:flow flow-name="xsl-region-body">
      <fo:block space-after="6pt" font-weight="bold" font-family="Times"
font-size="14pt" keep-with-next="always"                          
break-before="page">
        Get Booking Request
      </fo:block>
      <fo:block space-before="6pt" font-family="times" font-size="12pt"
space-after="6pt">
        This request is used to retrieve an existing booking or quote.
blah blah blah blah blah blah blah blah blah blah
        blah blah blah blah blah

      </fo:block>
      <fo:block font-family="Courier" font-size="10pt" space-before="6pt"
space-after="6pt" text-align="left"
                border-style="solid" border-width="0.25pt"
                padding-left="4pt" padding-right="4pt" padding-top="6pt"
padding-bottom="6pt" line-height="15pt">
        <fo:block>&lt;CalypsoRequest&gt;&#xA;</fo:block>
        <fo:block>&#160;&#160;&lt;Request&gt;&#xA;</fo:block>
        <fo:block>&#160;&#160;&#160;&#160;&lt;GetBookingRQ Company="AU"
BookingNumber="012345"/&gt;&#160;</fo:block>
        <fo:block>&#160;&#160;&lt;/Request&gt;&#xA;</fo:block>
        <fo:block>&lt;/CalypsoRequest&gt;&#xA;</fo:block>
      </fo:block>
      <fo:block>&#xA;</fo:block>
      <fo:table font-family="Times" font-size="12pt"
                table-layout="fixed" space-after="12pt" space-before="6pt"
                padding-top="6pt" padding-bottom="6pt">
          <fo:table-column column-width="1.94cm"/>
          <fo:table-column column-width="14.97cm"/>
          <fo:table-body>
            <fo:table-row>
              <fo:table-cell number-columns-spanned="2"
border-color="black" border-width="0.75pt"
border-style="solid"
                             padding-left="3pt" padding-right="3pt"
padding-bottom="3pt" padding-top="3pt">
                <fo:block font-weight="bold">
                  GetBookingRQ
                </fo:block>
	      </fo:table-cell>
	    </fo:table-row>
        </fo:table-body>
      </fo:table>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

Firstly, I would am still confused about the difference between
space-before and padding-before and padding-top. If someone could explain
that to me, that would be great.

Secondly, I would like the table aligned with the border of block before
it. Yes, I am aware the table is too long, but as it is not even starting
at the right point right now, that does not bother me as much.

I am using the version of FOP that comes with cocoon-2.1.9. Thanks.

Kamal.



--
Disclaimer: This email is confidential and may contain privileged information for the sole use of the person or business to which it is addressed. If you are not the intended recipient, please notify the sender by return e-mail or phone as you must not view, disseminate, distribute or copy this email without our consent. We do not accept any liability in connection with any computer virus, data corruption, incompleteness, or unauthorised amendment of this email. It is the sole responsibility of the receiver to scan for viruses before opening.

Current Thread