[xsl] send overflow to row below

Subject: [xsl] send overflow to row below
From: "James Steven" <JSteven@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 4 Oct 2004 12:10:58 +0100
Hello

I'm using xsl-fo to produce a table.  The table is formatted fine
apart from one column which has an overflow because of the page size.  An
overflow on this particular column is expected except that I would like the
overflow to continue on the row below.  Instead the table is formatted so
that the content of the column starts one or two rows above that of the
row where it should start.  How can I change the xsl-fo to make the overflow
go below the row the content should be formatted on and not above?

eg. Currently the xml-fo is formats the table as:

Accommodation_Types
Column		    Properties
                                  This is the Primary Key for Accommodation
Accommodation Type    Description Types
                      DataType    smallint (2)

Instead I would like:
Accommodation_Types
Column		    Properties
Accommodation Type    Description This is the Primary Key for Accommodation
                                  Types
                      DataType    smallint (2)

Any help is much appreciated.
Thanks
James

XML:
<Dictionary>
  <Table Name="Accommodation_Types">
    <Column Name="AccommodationType">
      <Description>This is the Primary Key for Accommodtion
Types</Description>
      <DataType>smallint (2)</DataType>
    </Column>
    <Column Name="Active">
      <Description>This is to see if the Accommodation type is
Active</Description>
      <DataType>bit (1)</DataType>
    </Column>
    <Column Name="Description">
      <Description>Description of Accommodation Type</Description>
      <DataType>char (35)</DataType>
    </Column>
   </Table>
</Dictionary>

XSL snip:
 <xsl:attribute-set name="orderlist.table.detail.textcolumns">
        <xsl:attribute name="border-top-style">none</xsl:attribute>
        <xsl:attribute name="border-bottom-style">none</xsl:attribute>
        <xsl:attribute name="border-width"></xsl:attribute>
        <xsl:attribute name="display-align">after</xsl:attribute>
        <xsl:attribute name="text-align">start</xsl:attribute>
        <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
        <xsl:attribute name="padding-left">.5mm</xsl:attribute>
        <xsl:attribute name="padding-bottom">.5mm</xsl:attribute>
        <xsl:attribute name="padding-top">.5mm</xsl:attribute>
    </xsl:attribute-set>

   <xsl:attribute-set name="orderlist.table.detail.textcolumns3">
       <xsl:attribute name="border-top-style">none</xsl:attribute>
       <xsl:attribute name="border-bottom-style">none</xsl:attribute>
       <xsl:attribute name="border-width">
	 </xsl:attribute>
       <xsl:attribute name="display-align">after</xsl:attribute>
       <xsl:attribute name="text-align">start</xsl:attribute>
       <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
       <xsl:attribute name="padding-left">.5mm</xsl:attribute>
       <xsl:attribute name="padding-top">.5mm</xsl:attribute>
    </xsl:attribute-set>

    <xsl:attribute-set name="orderlist.table.detail.blocks">
        <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
        <xsl:attribute name="padding-left">.5mm</xsl:attribute>
        <xsl:attribute name="padding-bottom">.5mm</xsl:attribute>
        <xsl:attribute name="padding-top">.5mm</xsl:attribute>
        <xsl:attribute name="font-size">10pt</xsl:attribute>
        <xsl:attribute name="font-family">sans-serif</xsl:attribute>
    </xsl:attribute-set>

   <xsl:for-each select="Table">
   <fo:table table-layout="fixed">
    <fo:table-column column-width="180mm"/>
    <fo:table-body>
     <fo:table-row>
     <fo:table-cell>
      <fo:block space-before.optimum="5mm">
      </fo:block>
	 </fo:table-cell>
	 </fo:table-row>
    <fo:table-row>
     <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
      <fo:block xsl:use-attribute-sets="orderlist.table.detail.blocks">
	 <xsl:attribute name="background-color">#ffffff</xsl:attribute>
	 <xsl:attribute name="font-weight">bold</xsl:attribute>
	 <xsl:value-of select="@Name" />
      </fo:block>
      </fo:table-cell>
	 </fo:table-row>
	  </fo:table-body>
	 </fo:table>
  <fo:table table-layout="fixed">
   <fo:table-column column-width="67mm" />
   <fo:table-column column-width="1mm" />
   <fo:table-column column-width="112mm" />
    <fo:table-body>
     <fo:table-row>
      <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
       <fo:block font-weight="bold" background-color="#cccccc"
         text-align="start" font-size="10pt" fontfamily="sans-serif">
        <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
        <xsl:attribute name="padding-left">.5mm</xsl:attribute>
        <xsl:attribute name="padding-bottom">.5mm</xsl:attribute>
        <xsl:attribute name="padding-top">.5mm</xsl:attribute>
        Column</fo:block>
         </fo:table-cell>
         <fo:table-cell>
         </fo:table-cell>
         <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
           <fo:block font-weight="bold" background-color="#cccccc"
text-align
            ="start" font-size="10pt" font-family="sans-serif">
             <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
             <xsl:attribute name="padding-left">.5mm</xsl:attribute>
             <xsl:attribute name="padding-bottom">.5mm</xsl:attribute>
             <xsl:attribute name="padding-top">.5mm</xsl:attribute>
             Properties</fo:block>
         </fo:table-cell>
       </fo:table-row>
      </fo:table-body>
    </fo:table>
    <fo:table table-layout="fixed">
      <fo:table-column column-width="67mm"/>
	<fo:table-column column-width="1mm" />
	<fo:table-column column-width="34mm"/>
      <fo:table-column column-width="1mm"/>
      <fo:table-column column-width="77mm" />
     <fo:table-body>
      <xsl:for-each select="Column">
        <fo:table-row>
         <xsl:if test="position() mod 2 = 1">
          <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns3">
            <fo:block
xsl:use-attribute-sets="orderlist.table.detail.blocks">
              <xsl:attribute name="background-color">#eeeeee</xsl:attribute>
              <xsl:value-of select="@Name" />
             </fo:block>
            </fo:table-cell>
         </xsl:if>
         <xsl:if test="position() mod 2 = 0">
           <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns3">
            <fo:block
xsl:use-attribute-sets="orderlist.table.detail.blocks">
             <xsl:attribute name="background-color">#ffffff</xsl:attribute>
              <xsl:value-of select="@Name" />
             </fo:block>
            </fo:table-cell>
         </xsl:if>
          <fo:table-cell>
          </fo:table-cell>
         <xsl:if test='./Description'>
         <xsl:if test="position() mod 2 = 1">
          <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
	     <fo:block font-weight="bold" background-color="#eeeeee" text-align
            ="start" font-size="10pt" font-family="sans-serif">
	       <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
		 <xsl:attribute name="padding-left">.5mm</xsl:attribute>
		 <xsl:attribute name="padding-bottom">.5mm</xsl:attribute>
		 <xsl:attribute name="padding-top">.5mm</xsl:attribute>
		 Description</fo:block>
           </fo:table-cell>
          </xsl:if>
          <xsl:if test="position() mod 2 = 0">
           <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
	      <fo:block font-weight="bold" background-color="#ffffff" text-align
             ="start" font-size="10pt" font-family="sans-serif">
	       <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
		 <xsl:attribute name="padding-left">.5mm</xsl:attribute>
		 <xsl:attribute name="padding-bottom">.5mm</xsl:attribute>
		 <xsl:attribute name="padding-top">.5mm</xsl:attribute>
		 Description</fo:block>
           </fo:table-cell>
           </xsl:if>
            <fo:table-cell>
            </fo:table-cell>
           <xsl:if test="position() mod 2 = 1">
            <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
              <fo:block
xsl:use-attribute-sets="orderlist.table.detail.blocks">
                <xsl:attribute
name="background-color">#eeeeee</xsl:attribute>
                  <xsl:value-of select="./Description" />
               </fo:block>
             </fo:table-cell>
            </xsl:if>
            <xsl:if test="position()mod 2 = 0">
             <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
               <fo:block
xsl:use-attribute-sets="orderlist.table.detail.blocks">
                 <xsl:attribute
name="background-color">#ffffff</xsl:attribute>
                 <xsl:value-of select="./Description" />
               </fo:block>
               </fo:table-cell>
              </xsl:if>
              </xsl:if>
               </fo:table-row>
              <xsl:if test='./DataType'>
               <fo:table-row>
             <xsl:if test="position()mod 2 = 1">
               <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns2">
			<xsl:attribute name="background-color">#eeeeee</xsl:attribute>&#160;
		</fo:table-cell>
		</xsl:if>
		<xsl:if test="position() mod 2 = 0">
		  <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns2">
		   <xsl:attribute name="background-color">#ffffff</xsl:attribute>&#160;
		  </fo:table-cell>
            </xsl:if>
              <fo:table-cell>
              </fo:table-cell>
            <xsl:if test="position() mod 2 = 1">
              <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
		   <fo:block font-weight="bold" background-color="#eeeeee" text-align
                ="start" font-size="10pt" font-family="sans-serif">
		     <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
		     <xsl:attribute name="padding-left">.5mm</xsl:attribute>
		     <xsl:attribute name="padding-bottom">.5mm</xsl:attribute>
		     <xsl:attribute name="padding-top">.5mm</xsl:attribute>
		     DataType</fo:block>
		   </fo:table-cell>
		</xsl:if>
		<xsl:if test="position() mod 2 = 0">
		 <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
		   <fo:block font-weight="bold" background-color="#ffffff"  text-align
                ="start" font-size="10pt" font-family="sans-serif">
		    <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
		    <xsl:attribute name="padding-left">.5mm</xsl:attribute>
		    <xsl:attribute name="padding-bottom">.5mm</xsl:attribute>
		    <xsl:attribute name="padding-top">.5mm</xsl:attribute>
		    DataType</fo:block>
		   </fo:table-cell>
            </xsl:if>
             <fo:table-cell>
             </fo:table-cell>
                <xsl:if test="position()mod 2 = 1">
             <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
                <fo:block
xsl:use-attribute-sets="orderlist.table.detail.blocks">
                 <xsl:attribute
name="background-color">#eeeeee</xsl:attribute>
                 <xsl:value-of select="./DataType" />
                </fo:block>
              </fo:table-cell>
             </xsl:if>
             <xsl:if test="position()mod 2 = 0">
             <fo:table-cell
xsl:use-attribute-sets="orderlist.table.detail.textcolumns">
              <fo:block
xsl:use-attribute-sets="orderlist.table.detail.blocks">
                <xsl:attribute
name="background-color">#ffffff</xsl:attribute>
                <xsl:value-of select="./DataType" />
              </fo:block>
             </fo:table-cell>
             </xsl:if>
            </fo:table-row>
            </xsl:if>
           </xsl:for-each>
         </fo:table-body>
      </fo:table>
   </xsl:for-each>

This message has been scanned for unacceptable content by 'VITANIUM'
the industry leading email virus and content management service from
Vitanium Systems. Contact details are available at www.vitanium.com.

Current Thread