Subject: Re: [xsl] table header respecting xml structure From: Manolis Mavrikis <M.Mavrikis@xxxxxxxx> Date: Wed, 04 Feb 2004 20:16:36 +0000 |
<xsl:choose> <xsl:when test="name()='column'"> <td> <xsl:attribute name="rowspan"><xsl:value-of select="count(group)+1"></xsl:attribute> <xsl:value-of select="@desc"/> </td> </xsl:when><xsl:when test="name()='group'> <td> <xsl:attribute name="colspan"><xsl:value-of select="count(descendant::*)-1"></xsl:attribute> <xsl:value-of select="@desc"/> </td> </xsl:when></xsl:choose> </xsl:template>
Hi all,
I have the following document: <root> <column desc="Col 1"/> <column desc="Col 2"/> <group desc="More Cols"> <column desc="Col 1"/> <column desc="Col 2"/> <group desc="Depth Col"> <column desc="Col 1"/> <column desc="Col 2"/> </group> </group> <column desc="Col 3"/> <column desc="Col 4"/> </root>
and I want to build a table with the header respecting the document structure, that should look like:
TABLE: ================================================================ | | More Cols | | | Col 1 | Col 2 | Col 1 | Col 2 | Depth Col | Col 3 | Col 4 | | | | |Col 1 | Col 2| | | ===============================================================|
I'm stucked with this problem ... does anyone have any sugestion or has done something similar?? Thaks for any help!!
Rui
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] table header respecting xml s, Rui Alberto L. | Thread | Re: [xsl] table header respecting x, Rui Alberto L. |
[xsl] Re: sum, Dimitre Novatchev | Date | RE: [xsl] Debugging XSLT, David Tolpin |
Month |