Solved

fo:xsl keep-together problem

Posted on 2003-10-22
1
411 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
1 Comment
 
LVL 11

Accepted Solution

by:
petiex earned 125 total points
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now