Solved

fo:xsl keep-together problem

Posted on 2003-10-22
1
417 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Word files to Wordpress Posts 2 77
TSQL Query Into Specific XML Format w/ Multiple Groupings 6 55
xml with php question 5 52
XML loaded in a form with dropdown 6 51
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 …
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

739 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