Sorry! 

Now I find a way to solve the Problem. This is the code that work fine. 

  <xsl:variable name="tbl_num_row"> 
          <xsl:value-of select="count(preceding-sibling::row)"/> 
  </xsl:variable> 
  <xsl:if test="$tbl_num_row &lt; 2"> 
          <xsl:attribute name="keep-with-previous">always</xsl:attribute> 
  </xsl:if> 

Bye 

Holger 

[EMAIL PROTECTED] schrieb am 16.10.2008 09:20:17:

> 
> Hello! 
> 
> I have the problem that a table break to the next page and there is 
> only the header and one row on the page before. But I found a way 
> that hold some rows together. 
> 
> In the first 3 rows I insert as an attribute keep-with-
> previous="always" and this works fine. But I have a XSLT-style that 
> called for every row. In this template I insert a attribute-tag for 
> every row and so the complete table is on the new page. 
> 
> The question that I can't solve is, is there possible way to count 
> the rows that only 3 times the attribute is inserted? 
> 
> For a better understanding here the template code that works for the
> whole table: 
> 
> <xsl:template name="table.row.properties"> 
>   <xsl:attribute name="keep-with-previous">always</xsl:attribute> 
>   <!-- Keep header row with next row --> 
>   <xsl:if test="ancestor::thead"> 
>     <xsl:attribute 
name="keep-with-next.within-column">always</xsl:attribute>
>   </xsl:if> 
> </xsl:template> 
> 
> I use Fop 0.95 and Saxon 6.5.5 that parse it to fop. 
> 
> Bye 
> 
> Holger

Reply via email to