I think xsl:number is not what you need. You can count cells using the
last() function:

<xsl:template match="row">
  <fo:column column-width="{last()}"/>
  column definition
</xsl:template>

Storing a value and using it in another template is a problem, you should
try to count rows and generate table rows in once. Is it possible to specify
the column with for each column or it must be determined before the table
itself?

Petr

Pierre Rougier wrote:

> Hi all, (and thanks Pter for giving me the email of the python extension
> developer)
>
> I just have a very simple problem (but aren't all problems
> simples.....?) anyway:
>
> I want to count the number of cells in a table row:
>     I explain:
>                 in
>                     <table>
>                             <row>
>                                     <cell> any content </cell>
>                                     <cell> any content </cell>
>                                     <cell> any content </cell>
>                             </row>
>                             <row>
>                                     <cell> any content </cell>
>                                     <cell> any content </cell>
>                                     <cell> any content </cell>
>                             </row>
>                     </table>
> I want to print the table, and I need to fix a column width.... by
> dividing my table width by the number of cells in a row, I think...
> my problems are:
>                         -how can I count the number of cells in a row
> (as the xsl:number function is not implemented, I think)?
>                             (I though to iterate in my tags, but I don't
> manage to store and increment a value)
>
>                         -how can I store this value to be able to put a
> <fo:column column-width="size"> before my table description?

--
Petr Cimprich
Ginger Alliance Ltd.
www.gingerall.com


Reply via email to