i've an XSLT 2.0 which transforms an xhtml Table into an InDesign XML Table. This XSLT counts the maximum number of <td>
Elements within every row <tr>
Line 7 in the template below (max(for $td in //tr return count($td/td))
).
<xsl:template match="table">
<xsl:element name="id_table">
<xsl:attribute name="aid:trows">
<xsl:value-of select="count(child::*/tr)"/>
</xsl:attribute>
<xsl:attribute name="aid:tcols">
<xsl:value-of select="max(for $td in //tr return count($td/td))"/>
</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
I've no idea how to realize this with XSLT 1.0 - any ideas would greatly appreciated! Sadly there is only a 1.0 Processor in the Workflow Pipeline.