This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: math get maximum and subtract 1
Thanks again,
i tried to implement that but it doesn't work.
I thought i understand what your're up to but... no output at all-
please have a look: ( column widths not yet dynamic, and i don't see why
there is only @col=0 processed, or isn't it? or is that cause if @col=0 is
"reached" we need a new row?!) just a little confused.... :-/
anyway- the template is called but i don't get any output! what's wrong
here`?
<xsl:template match="DESCRIPTION_TABLE">
<xsl:variable name="nrows" select="DESCRIPTION_ITEM[last()]/@row + 1" />
<fo:table table-layout="fixed" width="100%">
<fo:table-column column-width="proportional-column-width(50)" />
<fo:table-column column-width="proportional-column-width(50)" />
<fo:table-body>
<xsl:for-each select="DESCRIPTION_ITEM[@col = 0]">
<fo:table-row>
<xsl:for-each select="../DESCRIPTION_ITEM[position() mod $nrows =
current()/@row + 1]">
<fo:table-cell>
<xsl:apply-templates />
</fo:table-cell>
</xsl:for-each>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</xsl:template>
----- Original Message -----
From: "Jeni Tennison" <jeni@jenitennison.com>
> <xsl:for-each select="DESCRIPTION_ITEM[@col = 0]">
> <fo:table-row>
> <xsl:for-each select="../DESCRIPTION_ITEM
> [position() mod $nrows =
> current()/@row + 1]">
> <fo:table-cell>
> ...
> </fo:table-cell>
> </xsl:for-each>
> </fo:table-row>
> </xsl:for-each>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list