RE: [xsl] Using XSL to Translate Repetitive-Node XML to Table with COLSPANs

Subject: RE: [xsl] Using XSL to Translate Repetitive-Node XML to Table with COLSPANs
From: "Andreas L. Delmelle" <a_l.delmelle@xxxxxxxxxx>
Date: Fri, 13 Feb 2004 00:05:35 +0100
> -----Original Message-----
> From: Hart, Leo
>

Hi,

You can use an expression like the following to determine the number of
following siblings with the same name:

<td colspan="{count(following-sibling::data[@name=current()/@name])+1}">
  <xsl:value-of select="@name" />
</td>

To make sure you only apply templates to unique data elements, use the
following in the template that handles your header elements:

<xsl:apply-templates select="data[not(@name=following-sibling::@name)]" />

Hope this helps!

Cheers,

Andreas


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread