I'm transforming a HTML like table to an Exchange table. I need to add a
<thead> element where nothing currently exists. I've written a template
examines whether or not the child of the first <tr> is a <th> or not. If
the test is true I can create the <thead> element wrapper for the <row>.
Where I'm stuck is, how to calculate whether or not there are multiple
rows that contain <th> elements. I need the <thead> to close AFTER the
last <tr> (row) that contains <th> elements.
Here is my current template:
<xsl:template match="tr[1]">
<xsl:if test="child::th">
<thead>
<row>
<xsl:apply-templates/>
</row>
</thead></xsl:if>
</xsl:template>
<xsl:template match="tr">
<row><xsl:apply-templates/></row>
</xsl:template>
--
*Charles Flanders*
Senior Content Analyst
cflanders(_at_)vasont(_dot_)com <mailto:cflanders(_at_)vasont(_dot_)com>
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--