|
Subject: [xsl] static vars or how to write dirty tags From: friepoertner <friepoertner@xxxxxxxxxxxxx> Date: Thu, 25 Oct 2001 12:20:20 +0200 |
Now I can create a multirow table-head from an existing tree ... but as xml is not as flexible as html is, i can't create row endings (</tr>) where I need them ...
The xml-file:
<chart>
<column>
<name>foo</name>
<column>
<name>bar</name>
</column>
</column>
</chart><xsl:template match="chart">
<table><tr>
<xsl:apply-templates select="descendant::column">
<xsl:sort select="count(ancestor::column)"/>
</xsl:apply-templates>
</tr></table><xsl:template match="column">
<xsl:variable name="colspan" select="count(.//column[not(column)])"/>
<td colspan="{$colspan}"><xsl:value-of select="name"/></td>
<xsl:if test="count(following-sibling::column) = 0">
</tr><tr> <!-- :-) well, thats what I want to do ... -->
</xsl:if>
</xsl:template>Is there a solution like this in xsl ? My next idea was <eval></tr></eval> but eval does not work ...!?
-- Ingo Friepoertner friepoertner@xxxxxxxxxxxxx
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Building attributes using, Jarno . Elovirta | Thread | RE: [xsl] static vars or how to wri, Michael Kay |
| RE: [xsl] using xsl to check for du, Michael Kay | Date | [xsl] xpath simple sum, Juan Perez |
| Month |