11.1 Tables

<..measure tablesREMOVE..>
 <script element="div::table" >
   <set name="rows" >
      <.open xslt script.>
      <.record number of rows.>
      <.close xslt script.>
   </set>
   <xslt name="." xml="." xsl="rows" />
 </script>
-_-_-

<..record number of rowsREMOVE..>
 <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() &gt; 1]
                                   | @* | text() | comment() " />
    </xsl:copy>
 </xsl:template>
-_-_-