wrote:
> generate a table from
> an xml document. This table has got a variable number of columns, but
> after last data row I'd like to add a "Total row", which colspan should
> be the number of columns less one:
Find some XPath expression that identifies the set of columns.
Use count() to count this
Use count()-1 to find the value you need. Maybe store this in a
variable,
Place this value into the <td colspan="..." > attribute by using either
the <td colspan="{$my-colspan-count}" > syntax with a variable,
or by using
<td><xsl:attribute name="colspan" ><xsl:value-of
select="count($my-columns) -1" /></xsl:attribute>
[...]
</td>