Solved

fo:xsl keep-together problem

Posted on 2003-10-22
1
420 Views
Last Modified: 2008-02-01
How could I keep this table together ? The  problem is that it could be several tables in one
page in the PDF-document, and if one of the tables is to large to fit into the page, then I want
the whole table to be moved into the next page.
<xsl:template name="TransportVehicleCharacteristics">
<xsl:param name="BWrak"/>                  
<fo:block keep-together="always" space-before="4mm" border-width="0pt" border-style="solid" space-start="0mm">
            <fo:table>
                  <fo:table-column column-width="180mm"/>
                        <fo:table-body>
                              <fo:table-row>
                                    <fo:table-cell>
      <!--Transport-ID,Datum,Tid, Del note nummer-->
                                          <fo:block space-before="1mm" border-width="1pt" border-style="solid" space-start="0mm">
                                                <fo:table>
                                                      <fo:table-column column-width="30mm"/>
                                                      <fo:table-column column-width="30mm"/>
                                                      <fo:table-column column-width="30mm"/>
                                                      <fo:table-column column-width="30mm"/>
                                                      <fo:table-column column-width="30mm"/>
                                                      <fo:table-column column-width="30mm"/>
                                                      <fo:table-body>
                                                            <fo:table-row>
                                                                  <fo:table-cell column-number="1">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" margin-left="2pt" space-before.optimum="2pt" font-weight="bold" >
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_Vehicle"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_Vehicle"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                        <fo:block font-size="10pt" margin-left="2pt">

                                                                              <xsl:for-each select="//DeliveryMessageHeader[position()= $BWrak]/DeliveryLeg/TransportVehicleCharacteristics/TransportVehicleIdentifier/">

                                                                              <xsl:if test="@TransportVehicleIdentifierType='LicencePlateNumber'">
                                                                                    <xsl:value-of select="."/>

                                                                              </xsl:if>
                                                                              </xsl:for-each>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="2">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before.optimum="2pt" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_TransportUnit"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_TransportUnit"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                        <fo:block font-size="10pt">
                                                                              <xsl:for-each select="//DeliveryMessageHeader[position()= $BWrak]/DeliveryLeg/TransportUnitCharacteristics/TransportUnitIdentifier">
                                                                                    <xsl:if test="@TransportUnitIdentifierType='TrailerID'">
                                                                                          <xsl:value-of select="."/>
                                                                                    </xsl:if>
                                                                              </xsl:for-each>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="3">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before.optimum="2pt" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_Date"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_Date"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                        <fo:block font-size="10pt">
                                                                              <xsl:apply-templates select="//DeliveryMessageHeader[position()=$BWrak]/DeliveryLeg/DeliveryDestination"/>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="4">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before.optimum="2pt" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_Time"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_Time"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                        <fo:block font-size="10pt">
                                                                              <xsl:apply-templates select="//DeliveryMessageHeader[position()=$BWrak]/DeliveryLeg/DeliveryDestination/Time"/>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="5">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before.optimum="2pt" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_DeliveryNote"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_DeliveryNote"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                        <fo:block font-size="10pt">
                                                                              <xsl:for-each select="//DeliveryMessageHeader[position()=$BWrak]/DeliveryMessageNumber">
                                                                                    <xsl:value-of select="."/>
                                                                              </xsl:for-each>
                                                                        </fo:block>                                                
                                                                  </fo:table-cell>
                                                            </fo:table-row>
                                                            <fo:table-row>
                                                                  <fo:table-cell column-number="1">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" margin-left="2pt" space-before.optimum="2pt" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_MillOrderNumber"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$DE_MillOrderNumber"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                        <fo:block font-size="10pt" margin-left="2pt">
                                                                              <xsl:for-each select="//DeliveryMessageLineItem[position()=$BWrak]/DeliveryMessageReference">
                                                                                    <xsl:if test="@DeliveryMessageReferenceType='MillOrderNumber'">
                                                                                          <xsl:value-of select="."/>
                                                                                    </xsl:if>
                                                                              </xsl:for-each>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="2">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before.optimum="2pt" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_Pos"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_Pos"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                        <fo:block font-size="10pt">
                                                                              <xsl:apply-templates select="//DeliveryMessageLineItem[position()= $BWrak]/PurchaseOrderLineItemNumber"/>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="3">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before.optimum="2pt" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_product"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_product"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                        <fo:block font-size="10pt">
                                                                              <xsl:for-each select="//DeliveryMessageLineItem[position()=$BWrak]/Product/ProductIdentifier/">
                                                                                    <xsl:if test="@Agency='Supplier'">
                                                                                          <xsl:call-template name="Product1"/>
                                                                                    </xsl:if>
                                                                              </xsl:for-each>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="4">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before.optimum="2pt" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_g"/>/<xsl:value-of select="$DE_m2"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_g"/>/<xsl:value-of select="$GB_m2"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                        <fo:block font-size="10pt">
                                                                              <xsl:value-of select="//DeliveryMessageLineItem[position()=$BWrak]/Product/Paper/PaperCharacteristics/BasisWeight"/>
                                                                                    <xsl:if test="@ProductBasisSizeType='GramsPerSquareMeter'">
                                                                                          <xsl:value-of select="DetailValue"/>
                                                                                    </xsl:if>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="5">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before.optimum="2pt" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_Width"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_Width"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                        <fo:block font-size="10pt">
                                                                              <xsl:for-each select="//DeliveryMessageLineItem[position()=$BWrak]/Product/Paper/Reel/ReelConversionCharacteristics/ReelWidth">
                                                                                    <xsl:value-of select="Value"/>
                                                                              </xsl:for-each>                  
                                                                        </fo:block>                                                
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="6">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before.optimum="2pt" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_DeliveryAddress"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_DeliveryAddress"/>
                                                                              </xsl:if>

                                                                        </fo:block>
                                                                        <fo:block font-size="10pt">
                                                                              <xsl:apply-templates select="//DeliveryMessageHeader[position()=$BWrak]/ShipToCharacteristics/ShipToParty/NameAddress/Name1"/>
                                                                        </fo:block>                                                
                                                                  </fo:table-cell>                                                                        
                                                            </fo:table-row>
                                                      </fo:table-body>
                                                </fo:table>       
                                          </fo:block>
                                    </fo:table-cell>
                              </fo:table-row>
                        <fo:table-row>
                              <fo:table-cell>
                                    <fo:block>
                                          <xsl:value-of select="$blank"/>
                                    </fo:block>
                              </fo:table-cell>
                        </fo:table-row>
            <!--Rubriker för rullar-->
                        <fo:table-row>
                              <fo:table-cell>
                                    <fo:block space-before="1mm" border-width="0pt" border-style="solid" space-start="1mm">
                                          <fo:table >
                                                <fo:table-column column-width="20mm"/>
                                                <fo:table-column column-width="20mm"/>
                                                <fo:table-column column-width="20mm"/>
                                                <fo:table-column column-width="20mm"/>
                                                <fo:table-column column-width="20mm"/>
                                                <fo:table-column column-width="20mm"/>
                                                <fo:table-column column-width="20mm"/>
                                                <fo:table-column column-width="20mm"/>
                                                <fo:table-column column-width="20mm"/>
                                                      <fo:table-body>
                                                            <fo:table-row>
                                                                  <fo:table-cell column-number="1">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_ReelNumber"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_ReelNumber"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="2">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_length"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_length"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="3">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_Netto"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_Netto"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="4">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" font-weight="bold">
                                                                        <xsl:if test="$Language = 'DE'">
                                                                              <xsl:value-of select="$DE_Brutto"/>
                                                                        </xsl:if>
                                                                        <xsl:if test="$Language = 'GB'">
                                                                              <xsl:value-of select="$GB_Brutto"/>
                                                                        </xsl:if>

                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="5">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" font-weight="bold">
                                                                              <xsl:value-of select="$SAKNAS"/>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="6">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_ReelNumber"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_ReelNumber"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="7">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_length"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_length"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="8">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_Netto"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_Netto"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                                  <fo:table-cell column-number="9">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" font-weight="bold">
                                                                              <xsl:if test="$Language = 'DE'">
                                                                                    <xsl:value-of select="$DE_Brutto"/>
                                                                              </xsl:if>
                                                                              <xsl:if test="$Language = 'GB'">
                                                                                    <xsl:value-of select="$GB_Brutto"/>
                                                                              </xsl:if>
                                                                        </fo:block>
                                                                  </fo:table-cell>
                                                            </fo:table-row>
                                                      </fo:table-body>
                                                </fo:table>       
                                          </fo:block>
                                    </fo:table-cell>
                              </fo:table-row>  
                              <fo:table-row>
                                    <fo:table-cell>
                                          <fo:block space-before="3mm" border-width="0pt" border-style="solid" space-start="1mm">
                                                <fo:table>
                                                      <fo:table-column column-width="20mm"/>
                                                      <fo:table-column column-width="20mm"/>
                                                      <fo:table-column column-width="20mm"/>
                                                      <fo:table-column column-width="20mm"/>
                                                      <fo:table-column column-width="20mm"/>
                                                      <fo:table-column column-width="20mm"/>
                                                      <fo:table-column column-width="20mm"/>
                                                      <fo:table-column column-width="20mm"/>
                                                      <fo:table-column column-width="20mm"/>
                                                            <fo:table-body>
                                                                  <fo:table-row>
                                                                        <fo:table-cell column-number="1">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans">
                                                                                    <xsl:for-each select="//DeliveryMessageLineItem[position()=$BWrak]/PackageInformation/ReelItem">
                                                                                          <xsl:variable name="Pos" select="Docpos"/>
                                                                                                <xsl:if test="$Pos=1">
                                                                                                      <xsl:call-template name="Rullnummer2"/>
                                                                                                </xsl:if>
                                                                                                
                                                                                    </xsl:for-each>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                        <fo:table-cell column-number="2">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans">
                                                                                    <xsl:for-each select="//DeliveryMessageLineItem[position()=$BWrak]/PackageInformation/ReelItem">
                                                                                          <xsl:variable name="Pos" select="Docpos"/>
                                                                                                <xsl:if test="$Pos=1">
                                                                                                      <xsl:call-template name="Rullength2"/>
                                                                                                </xsl:if>
                                                                                                
                                                                                    </xsl:for-each>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                        <fo:table-cell column-number="3">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans">
                                                                                    <xsl:for-each select="//DeliveryMessageLineItem[position()=$BWrak]/PackageInformation/ReelItem">
                                                                                          <xsl:variable name="Pos" select="Docpos"/>
                                                                                                <xsl:if test="$Pos=1">
                                                                                                      <xsl:call-template name="Rullviktnetto2"/>
                                                                                                </xsl:if>
                                                                                                
                                                                                    </xsl:for-each>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                        <fo:table-cell column-number="4">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans">
                                                                                    <xsl:for-each select="//DeliveryMessageLineItem[position()=$BWrak]/PackageInformation/ReelItem">
                                                                                          <xsl:variable name="Pos" select="Docpos"/>
                                                                                                <xsl:if test="$Pos=1">
                                                                                                      <xsl:call-template name="Rullviktbrutto2"/>
                                                                                                </xsl:if>
                                                                                                
                                                                                    </xsl:for-each>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                        <fo:table-cell column-number="5">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans">
                                                                                    <xsl:value-of select="$SAKNAS"/>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                        <fo:table-cell column-number="6">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans">
                                                                                    <xsl:for-each select="//DeliveryMessageLineItem[position()=$BWrak]/PackageInformation/ReelItem">
                                                                                          <xsl:variable name="Pos" select="Docpos"/>
                                                                                                <xsl:if test="$Pos=2">
                                                                                                      <xsl:call-template name="Rullnummer4"/>
                                                                                                </xsl:if>
                                                                                                
                                                                                    </xsl:for-each>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                        <fo:table-cell column-number="7">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans">
                                                                                    <xsl:for-each select="//DeliveryMessageLineItem[position()=$BWrak]/PackageInformation/ReelItem">
                                                                                          <xsl:variable name="Pos" select="Docpos"/>
                                                                                                <xsl:if test="$Pos=2">
                                                                                                      <xsl:call-template name="Rullength4"/>
                                                                                                </xsl:if>
                                                                                                
                                                                                    </xsl:for-each>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                        <fo:table-cell column-number="8">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans">
                                                                                    <xsl:for-each select="//DeliveryMessageLineItem[position()=$BWrak]/PackageInformation/ReelItem">
                                                                                          <xsl:variable name="Pos" select="Docpos"/>
                                                                                                <xsl:if test="$Pos=2">
                                                                                                      <xsl:call-template name="Rullviktnetto4"/>
                                                                                                </xsl:if>
                                                                                                
                                                                                    </xsl:for-each>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                        <fo:table-cell column-number="9">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans">
                                                                                    <xsl:for-each select="//DeliveryMessageLineItem[position()=$BWrak]/PackageInformation/ReelItem">
                                                                                          <xsl:variable name="Pos" select="Docpos"/>
                                                                                                <xsl:if test="$Pos=2">
                                                                                                      <xsl:call-template name="Rullviktbrutto4"/>
                                                                                                </xsl:if>
                                                                                                
                                                                                    </xsl:for-each>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                  </fo:table-row>
                                                      
                                                <!--Totalrad-->
                                                <fo:table-row>
                                                      <xsl:if test="//DeliveryMessage/DeliveryMessageSummary[position()=$BWrak]/TotalQuantity = 0">
                                                            <fo:table-cell column-number="1">
                                                                        <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before="2mm" font-weight="bold">
                                                                              <xsl:value-of select="$blank"/>
                                                                        </fo:block>
                                                            </fo:table-cell>
                                                      </xsl:if>
                                                      <xsl:if test="//DeliveryMessage/DeliveryMessageSummary[position()=$BWrak]/TotalQuantity &gt; 0">
                                                                        <fo:table-cell column-number="1">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before="2mm" font-weight="bold">
                                                                                    <xsl:if test="$Language = 'DE'">
                                                                                          <xsl:value-of select="$DE_Total"/>
                                                                                    </xsl:if>
                                                                                    <xsl:if test="$Language = 'GB'">
                                                                                          <xsl:value-of select="$GB_Total"/>
                                                                                    </xsl:if>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                          
                                                                        <fo:table-cell column-number="2">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before="2mm" font-weight="bold">
                                                                                    <xsl:if test="$Language = 'DE'">
                                                                                          <xsl:value-of select="$DE_NoOfReels"/>
                                                                                    </xsl:if>
                                                                                    <xsl:if test="$Language = 'GB'">
                                                                                          <xsl:value-of select="$GB_NoOfReels"/>
                                                                                    </xsl:if>
                                                                              </fo:block>
                                                                        </fo:table-cell>

                                                                        <fo:table-cell column-number="3">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before="2mm" font-weight="bold">
                                                                                    <xsl:for-each select="//DeliveryMessageLineItem[position()=$BWrak]/InformationalQuantity/Value/">
                                                                                          <xsl:if test="@UOM='Reel'">
                                                                                                <xsl:value-of select="."/>
                                                                                          </xsl:if>
                                                                                    </xsl:for-each>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                        <fo:table-cell column-number="4">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before="2mm" font-weight="bold">
                                                                                    <xsl:if test="$Language = 'DE'">
                                                                                          <xsl:value-of select="$DE_Totlength"/>
                                                                                    </xsl:if>
                                                                                    <xsl:if test="$Language = 'GB'">
                                                                                          <xsl:value-of select="$GB_Totlength"/>
                                                                                    </xsl:if>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                        <fo:table-cell column-number="5">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before="2mm" font-weight="bold">
                                                                                    <xsl:value-of select="sum(//DeliveryMessageLineItem[position()=$BWrak]/PackageInformation/ReelItem/DeliveryMessageReelCharacteristics/ReelLength)"/>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                        <fo:table-cell column-number="6">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before="2mm" font-weight="bold">
                                                                                    <xsl:if test="$Language = 'DE'">
                                                                                          <xsl:value-of select="$DE_Netto"/>
                                                                                    </xsl:if>
                                                                                    <xsl:if test="$Language = 'GB'">
                                                                                          <xsl:value-of select="$GB_Netto"/>
                                                                                    </xsl:if>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                        <fo:table-cell column-number="7">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before="2mm" font-weight="bold">
                                                                                    <xsl:for-each select="//DeliveryMessageLineItem[position()=$BWrak]/Quantity/">
                                                                                          <xsl:if test="@QuantityType='NettoWeight'">
                                                                                                <xsl:value-of select="."/>
                                                                                          </xsl:if>
                                                                                    </xsl:for-each>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                        <fo:table-cell column-number="8">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before="2mm" font-weight="bold">
                                                                                    <xsl:if test="$Language = 'DE'">
                                                                                          <xsl:value-of select="$DE_Brutto"/>
                                                                                    </xsl:if>
                                                                                    <xsl:if test="$Language = 'GB'">
                                                                                          <xsl:value-of select="$GB_Brutto"/>
                                                                                    </xsl:if>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                        <fo:table-cell column-number="9">
                                                                              <fo:block font-size="8pt" font-family="Arial, Helvetica, sans" space-before="2mm" font-weight="bold">
                                                                                    <xsl:for-each select="//DeliveryMessageLineItem[position()=$BWrak]/Quantity/">
                                                                                          <xsl:if test="@QuantityType='GrossWeight'">
                                                                                                <xsl:value-of select="."/>
                                                                                          </xsl:if>
                                                                                    </xsl:for-each>
                                                                              </fo:block>
                                                                        </fo:table-cell>
                                                                  </xsl:if>
                                                            </fo:table-row>
                                                            </fo:table-body>
                                                      </fo:table>      
                                                </fo:block>
                                          </fo:table-cell>
                                    </fo:table-row>
                              </fo:table-body>
                        </fo:table>
<!--This is the end of the keep-together section-->
                  </fo:block>
            
            </xsl:template>
0
Comment
Question by:t02agu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 11

Accepted Solution

by:
petiex earned 125 total points
ID: 9598219
Change each <fo:table-row> to
<fo:table:row keep-with-next="always">

Here is that specification:
http://www.w3.org/TR/xsl/slice7.html#keep-with-next
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question