[Home] [By Thread] [By Date] [Recent Entries]
Hi Clifton,
Match only on partition elements and check if you are on the first partition or on the first drive and in each case generate the corresponding columns with rowspan: <xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes"/>
<xsl:template match="summary">
<table border="1">
<xsl:apply-templates/>
</table>
</xsl:template> <xsl:template match="partition">
<tr>
<xsl:if test="not(preceding-sibling::partition) and
not(../preceding-sibling::drive)">
<td rowspan="{count(../..//partition)}">
<xsl:value-of select="../@name"/>
</td>
</xsl:if> <xsl:if test="not(preceding-sibling::partition)">
<td rowspan="{count(../partition)}">
<xsl:value-of select="../@name"/>
</td>
</xsl:if>
<td>
<xsl:value-of select="@name"/>
</td>
</tr>
</xsl:template>
<xsl:template match="text()"/>
</xsl:stylesheet>Best Regards, George --------------------------------------------------------------------- George Cristian Bina - http://aboutxml.blogspot.com/ <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Clifton Mullen wrote: I'm trying to build a table with three columns. The first two may have a rowspan attribute. Something like this...
|

Cart



