<xsl:template match="
div[ (@class=’table’)
and
((@title=’tabular’) or (@title=’array’))
]
" >
<xsl:copy>
<xsl:apply-templates select="@*" />
<div class="begin-end" title="speech-extra">
<xsl:value-of select="
concat( child::*[1] /self::div[
(@class = ’begin-end’) and (@title = ’speech-extra’)
],
’ with ’,
count(child::*) - 2 ,
’ rows ’
) " />
</div>
<xsl:apply-templates select=" *[position() > 1]
| @* | text() | comment() " />
</xsl:copy>
</xsl:template>
-_-_-