[xsl] Calcuting TH rows

Subject: [xsl] Calcuting TH rows
From: Charles Flanders <cflanders@xxxxxxxxxx>
Date: Fri, 09 Jan 2009 17:43:12 -0500
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">
<xsl:template match="tr">


*Charles Flanders*

Senior Content Analyst

cflanders@xxxxxxxxxx <mailto:cflanders@xxxxxxxxxx>

Current Thread