plantillas fop

infor
17 de Septiembre del 2008
Buenas!
Tengo un pequeño problema. Estoy generando un pdf con plantillas fo, y mi xml es el siguiente:

<?xml version="1.0" encoding="ISO-8859-1"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

<fo:layout-master-set>

<!-- layout for the first page -->
<fo:simple-page-master master-name="only"
page-height="29.7cm"
page-width="21cm"
margin-top="0.5cm"
margin-bottom="0.5cm"
margin-left="1cm"
margin-right="1cm">
<fo:region-body margin-top="4cm" margin-bottom="1.5cm"/>
<fo:region-before extent="5cm"/>
<fo:region-after extent="2cm"/>
</fo:simple-page-master>

</fo:layout-master-set>
<!-- end: defines page layout -->

<!-- actual layout -->
<fo:page-sequence master-reference="only" initial-page-number="1" force-page-count="no-force">

<fo:static-content flow-name="xsl-region-before">
<fo:table>
<fo:table-column column-width="10cm"/>
<fo:table-column column-width="6cm"/>
<fo:table-column column-width="15cm"/>

<fo:table-body>
<fo:table-row >
<fo:table-cell>
<fo:block>
<fo:external-graphic src="url('/datos/v21t/file/logo_gobierno_homes.gif')" width="40mm"/>
<fo:external-graphic src="url('/datos/v21t/file/tit_vivienda_es.gif')" width="40mm"/>
</fo:block>
</fo:table-cell>
<fo:table-cell><fo:block></fo:block></fo:table-cell>

</fo:table-row >
</fo:table-body>

</fo:table>

</fo:static-content>

<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="end" font-size="10pt" font-family="serif" line-height="14pt" padding-top="1cm" >
Página. <fo:page-number/> de <fo:page-number-citation ref-id="theEnd"/>
</fo:block>
</fo:static-content>



<fo:flow flow-name="xsl-region-body">



<fo:table width="100%" border-collapse="separate" border-left-width="0.5pt">

<fo:table-column column-width="19cm"/>
<fo:table-column column-width="1cm"/>

<fo:table-body>
$$$COLECCION=(listaSol.size-1)$$$

<fo:table-row>
<fo:table-cell>
<fo:block text-align="right" >
$$$solicitanteNombre$$$ $$$solicitanteApellidos$$$
</fo:block>
<fo:block text-align="right" >
$$$calle$$$$$$municipio$$$
</fo:block>
<fo:block text-align="right" >
$$$cp$$$$$$th$$$
</fo:block>
</fo:table-cell>
<fo:table-cell >
<fo:block >
</fo:block>
</fo:table-cell>
</fo:table-row>

<fo:table-row height="60px">

<fo:table-cell>
<fo:block></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block></fo:block>
</fo:table-cell>

</fo:table-row>


<fo:table-row >

<fo:table-cell font-size="12px" height="30px" >
<fo:block font-style="italic" >
$$$consulta$$$
</fo:block>
<fo:block ></fo:block>
</fo:table-cell>
<fo:table-cell >
<fo:block >
</fo:block>
</fo:table-cell>
</fo:table-row >

<fo:table-row >

<fo:table-cell font-size="12px" >
<fo:block font-style="normal" >
$$$respuestaC$$$
</fo:block>
</fo:table-cell>.
<fo:table-cell>
<fo:block></fo:block>
</fo:table-cell>

</fo:table-row >

<fo:table-row height="10px">
<fo:table-cell>
<fo:block></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block></fo:block>
</fo:table-cell>

</fo:table-row>


<fo:table-row >
<fo:table-cell font-size="12px" >
<fo:block font-style="normal" >
$$$respuestaE$$$
</fo:block>
</fo:table-cell>.
<fo:table-cell >
<fo:block >
</fo:block>
</fo:table-cell>

</fo:table-row >


<fo:table-row >
<fo:table-cell>
<fo:block break-before="page" >
</fo:block>
</fo:table-cell>
</fo:table-row>

$$$COLECCION$$$


</fo:table-body>


</fo:table>
<fo:block id="theEnd"/>
</fo:flow>

</fo:page-sequence>
</fo:root>

vale, lo q me importa es a la hora de pintar los datos de la colleccion. Si veis, cada vez que escribo algun elemento de la lista, hago un salto de pagina. el porblema esta en que cuando es el utlimo elemento de la coleccion tb me inserta un salto de pagina y al final simpre me sale una pagina en blanco y no se como se ponen condiciones o que solo me recorra la lista hasta el ante-ultimo elemento,,,, si alguien teine alguna solucion por favor, ya que es urgente!! quiero kitar la utlima pagina en blanco!!!
Muchas gracias...