table bottom border is not coming using multi column page approach

Hi,

  I am not sure how to get table bottom border when i use the
following code.

PS : xml is right now short, you can copy one row and
paste again and again to get more data and see what
happens.


XML code
===========
<NI PUBLISH="DEC31">
 <HEADER>
  <PARA>CFM56-5CA340 - CFM56-5C</PARA>
  <PARA>POWER PLANT ILLUSTRATED PARTS CATALOG</PARA>
 </HEADER>
 <TABLE>
  <THEAD>
   <ROW>
    <ENTRY>
     <PARA>Part Number</PARA>
     <PARA>CH-SECT-UNIT-FIG-ITEM</PARA>
    </ENTRY>
    <ENTRY>
     <PARA>Airline Part No.</PARA>
     <PARA>TTL REQ</PARA>
    </ENTRY>
   </ROW>
  </THEAD>
  <TBODY>
   <ROW>
    <ENTRY>
     <PARA>AN960C416L</PARA>
     <PARA LEVEL="2">73 34 15  01  050</PARA>
    </ENTRY>
    <ENTRY>
     <PARA/>
     <PARA>3</PARA>
    </ENTRY>
   </ROW>
   <ROW>
    <ENTRY>
     <PARA>MS9557-09</PARA>
     <PARA LEVEL="2">73 34 15  01  010</PARA>
    </ENTRY>
    <ENTRY>
     <PARA/>
     <PARA>3</PARA>
    </ENTRY>
   </ROW>
   <ROW>
    <ENTRY>
     <PARA>MS9557-09</PARA>
     <PARA LEVEL="2">73 34 15  01  010</PARA>
    </ENTRY>
    <ENTRY>
     <PARA/>
     <PARA>3</PARA>
    </ENTRY>
   </ROW>
  </TBODY>
 </TABLE>
</NI>

XSL Code
==========

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
 <xsl:output method="xml" version="1.0" omit-xml-declaration="no"
indent="yes"/>
 <xsl:template match="NI">
  <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
   <!-- start of page layout definitions -->
   <fo:layout-master-set>
    <!-- layout for even pages -->
    <fo:simple-page-master master-name="EvenPage" page-height="297mm"
page-width="210mm" margin-top="1in" margin-bottom="1in" margin-left="0.62in"
margin-right="1.12in">
     <fo:region-before region-name="EvenPageHeader" extent="1in"/>
     <fo:region-body column-count="2" column-gap="10mm" border-style="none"
border-width="thin" margin-top="50px" margin-left="50px" margin-right="50px"
margin-bottom="50px"/>
     <fo:region-after region-name="EvenPageFooter" extent="1in"/>
    </fo:simple-page-master>
    <!-- layout for even pages -->
    <!-- layout for odd pages -->
    <fo:simple-page-master master-name="OddPage" page-height="297mm"
page-width="210mm" margin-top="1in" margin-bottom="1in" margin-left="0.62in"
margin-right="1.12in">
     <fo:region-before region-name="OddPageHeader" extent="1in"/>
     <fo:region-body column-count="2" column-gap="20mm" border-style="none"
border-width="thin" margin-top="50px" margin-left="50px" margin-right="50px"
margin-bottom="50px"/>
     <fo:region-after region-name="OddPageFooter" extent="1in"/>
    </fo:simple-page-master>
    <!-- layout for odd pages -->
    <!-- document layout -->
    <fo:page-sequence-master master-name="enigma">
     <fo:repeatable-page-master-alternatives>
      <fo:conditional-page-master-reference odd-or-even="even"
master-reference="EvenPage"/>
      <fo:conditional-page-master-reference odd-or-even="odd"
master-reference="OddPage"/>
     </fo:repeatable-page-master-alternatives>
    </fo:page-sequence-master>
    <!-- document layout -->
   </fo:layout-master-set>
   <!-- end of page layout definitions -->
   <!-- page two -->
   <fo:page-sequence master-reference="enigma">
    <!-- odd page header & footer -->
    <fo:static-content flow-name="OddPageHeader">
     <fo:block text-align="center" font-family="Courier" font-size="11pt">
      <xsl:call-template name="header_section">
       <xsl:with-param name="currstr" select="HEADER/PARA"/>
      </xsl:call-template>
     </fo:block>
    </fo:static-content>
    <fo:static-content flow-name="OddPageFooter">
     <fo:block text-align="center" font-family="Courier" font-size="11pt">
      <xsl:call-template name="footer_section">
       <xsl:with-param name="publish" select="//@PUBLISH"/>
      </xsl:call-template>
     </fo:block>
     <fo:block text-align="center" font-size="7pt" font-family="Courier">
      Printed in U.S.A.
     </fo:block>
    </fo:static-content>
    <!-- odd page header & footer -->
    <!-- even page header & footer -->
    <fo:static-content flow-name="EvenPageHeader">
     <fo:block text-align="center" font-family="Courier" font-size="11pt">
      <xsl:call-template name="header_section">
       <xsl:with-param name="currstr" select="HEADER/PARA"/>
      </xsl:call-template>
     </fo:block>
    </fo:static-content>
    <fo:static-content flow-name="EvenPageFooter">
     <fo:block text-align="center" font-family="Courier" font-size="11pt">
      <xsl:call-template name="footer_section">
       <xsl:with-param name="publish" select="//@PUBLISH"/>
      </xsl:call-template>
     </fo:block>
     <fo:block text-align="center" font-size="7pt" font-family="Courier">
      Printed in U.S.A.
     </fo:block>
    </fo:static-content>
    <!-- even page header & footer -->
    <fo:flow flow-name="xsl-region-body" font-family="Courier"
font-size="11pt">
     <fo:block>
      <fo:table>
       <fo:table-column column-width="50mm"/>
       <fo:table-column column-width="30mm"/>
       <fo:table-header border-color="black" border-style="solid"
border-width="0.2mm" font-size="8pt">
        <fo:table-row>
         <fo:table-cell>
          <fo:block text-align="left">
           <xsl:value-of select="TABLE/THEAD/ROW/ENTRY[1]/PARA[1]"/>
          </fo:block>
          <fo:block text-align="center">
           <xsl:value-of select="TABLE/THEAD/ROW/ENTRY[1]/PARA[2]"/>
          </fo:block>
         </fo:table-cell>
         <fo:table-cell>
          <fo:block text-align="center">
           <xsl:value-of select="TABLE/THEAD/ROW/ENTRY[2]/PARA[1]"/>
           <xsl:value-of select="TABLE/THEAD/ROW/ENTRY[2]/PARA[2]"/>
          </fo:block>
         </fo:table-cell>
        </fo:table-row>
       </fo:table-header>
       <fo:table-body>
        <xsl:for-each select="TABLE/TBODY/ROW">

        <xsl:choose>
         <xsl:when test="position() = last()">
        <fo:table-row>
          <fo:table-cell  border-left-color="black"
border-left-style="solid" border-left-width="0.5pt"
border-bottom-color="black" border-bottom-style="solid"
border-bottom-width="0.5pt" border-right-color="black"
border-right-style="solid" border-right-width="0.5pt"
border-top-color="black" border-top-style="hidden" border-top-width="0.5pt"
border-collapse="collapse" text-align="center">
           <fo:block text-align="left">
            <xsl:value-of select="ENTRY[1]/PARA[1]"/>
           </fo:block>
           <fo:block text-align="right">
            <xsl:value-of select="ENTRY[1]/PARA[2]"/>
           </fo:block>
          </fo:table-cell>
          <fo:table-cell  border-left-color="black"
border-left-style="solid" border-left-width="0.5pt"
border-bottom-color="black" border-bottom-style="solid"
border-bottom-width="0.5pt" border-right-color="black"
border-right-style="solid" border-right-width="0.5pt"
border-top-color="black" border-top-style="hidden" border-top-width="0.5pt"
border-collapse="collapse" text-align="center">
           <fo:block text-align="center">
            <xsl:value-of select="ENTRY[2]/PARA[1]"/>
           </fo:block>
           <fo:block text-align="center">
            <xsl:value-of select="ENTRY[2]/PARA[2]"/>
           </fo:block>
          </fo:table-cell>
         </fo:table-row>
         </xsl:when>
         <xsl:otherwise>
        <fo:table-row>
          <fo:table-cell  border-left-color="black"
border-left-style="solid" border-left-width="0.5pt"
border-bottom-color="black" border-bottom-style="hidden"
border-bottom-width="0.5pt" border-right-color="black"
border-right-style="solid" border-right-width="0.5pt"
border-top-color="black" border-top-style="hidden" border-top-width="0.5pt"
border-collapse="collapse" text-align="center">
           <fo:block text-align="left">
            <xsl:value-of select="ENTRY[1]/PARA[1]"/>
           </fo:block>
           <fo:block text-align="right">
            <xsl:value-of select="ENTRY[1]/PARA[2]"/>
           </fo:block>
          </fo:table-cell>
          <fo:table-cell  border-left-color="black"
border-left-style="solid" border-left-width="0.5pt"
border-bottom-color="black" border-bottom-style="hidden"
border-bottom-width="0.5pt" border-right-color="black"
border-right-style="solid" border-right-width="0.5pt"
border-top-color="black" border-top-style="hidden" border-top-width="0.5pt"
border-collapse="collapse" text-align="center">
           <fo:block text-align="center">
            <xsl:value-of select="ENTRY[2]/PARA[1]"/>
           </fo:block>
           <fo:block text-align="center">
            <xsl:value-of select="ENTRY[2]/PARA[2]"/>
           </fo:block>
          </fo:table-cell>
         </fo:table-row>

         </xsl:otherwise>
        </xsl:choose>

        </xsl:for-each>
        <!-- looping ends here -->
       </fo:table-body>
      </fo:table>
     </fo:block>
    </fo:flow>
   </fo:page-sequence>
   <!-- page two -->
  </fo:root>
 </xsl:template>
 <!-- user defined template starts here -->
 <xsl:template name="header_section">
  <xsl:param name="currstr"/>
  <!-- please change the goodrich logo image location xml document path
accordingly -->
  <xsl:variable name="xmlDoc"
select="document('e:\enigma\output\AspirePrintScript_MOD.xml')"/>
  <xsl:variable name="logo_loc">
   <xsl:for-each select="$xmlDoc//printscript/var">
    <xsl:if test="contains(@name, 'UserDef')">
     <xsl:value-of select="@value"/>
    </xsl:if>
   </xsl:for-each>
  </xsl:variable>
  <fo:table table-layout="fixed" width="7in">
   <fo:table-column column-width="1.5in"/>
   <fo:table-column column-width="6in"/>
   <fo:table-body>
    <fo:table-row>
     <fo:table-cell text-align="left" vertical-align="top">
      <fo:block>
       <fo:external-graphic src="{$logo_loc}"/>
       <!--<fo:external-graphic src="goodrichlogo.gif"
text-align="start"/>-->
      </fo:block>
     </fo:table-cell>
     <fo:table-cell text-align="center">
      <fo:block>
       <xsl:for-each select="$currstr">
        <xsl:value-of select="."/>
        <fo:block/>
       </xsl:for-each>
      </fo:block>
     </fo:table-cell>
    </fo:table-row>
   </fo:table-body>
  </fo:table>
 </xsl:template>
 <xsl:template name="footer_section">
  <xsl:param name="publish"/>
  <fo:table table-layout="fixed" width="7in">
   <fo:table-column column-width="5in"/>
   <fo:table-column column-width="2in"/>
   <fo:table-body>
    <fo:table-row>
     <fo:table-cell text-align="left">
      <fo:block font-size="10pt">
       - ITEM NOT ILLUSTRATED
      </fo:block>
      <fo:block/>
      <fo:block>MASTER</fo:block>
     </fo:table-cell>
     <fo:table-cell text-align="right">
      <fo:block>NUMERICAL INDEX</fo:block>
      <fo:block>NUMERIC - PAGE - <fo:page-number/>
      </fo:block>
      <fo:block>
       <xsl:value-of select="$publish"/>
      </fo:block>
     </fo:table-cell>
    </fo:table-row>
   </fo:table-body>
  </fo:table>
 </xsl:template>
 <!-- user defined template ends here -->
</xsl:stylesheet>

Looking forward for some response

Karthikeyan B

Received on Thursday, 30 October 2003 11:55:31 UTC