xsl-list
[Top] [All Lists]

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

2004-02-12 16:05:35
-----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[(_at_)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



<Prev in Thread] Current Thread [Next in Thread>