RE: changing table column to row

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