|
Subject: RE: changing table column to row From: Kay Michael <Michael.Kay@xxxxxxx> Date: Mon, 7 Feb 2000 13:05:56 -0000 |
> i have a xml file with data in columns,
> Is there an easy (and efficient) way to change this into the
> html row model.
<xsl:template name="one-row">
<xsl:param name="row-num" select="1">
<tr>
<xsl:for-each select="column">
<td><value-of select="*[$row-num]"></td>
</xsl:for-each>
</tr>
<xsl:if test="column/*[$row-num+1]">
<xsl:call-template name="one-row"/>
<xsl:with-param name="row-num" select="$row-num+1"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
Needs a little more care if the columns could be different lengths.
MHK
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| changing table column to row, Martin Rothschink | Thread | RE: Nodeset equality, inequality, a, Kay Michael |
| RE: Style Matters - A class act, Didier PH Martin | Date | RE: Appending a Document to another, Kay Michael |
| Month |