Re: RE: [xsl] HTML Table

Subject: Re: RE: [xsl] HTML Table
From: v.kavanagh@xxxxxxxxxxxx
Date: Wed, 3 Sep 2003 17:24:02 +0000

Thanks for your replies.

This is the HTML table I?m trying to draw;

This is an example of the xml;
 <box BoxID="123" BoxRef="abc123"/>
 <box BoxID="1234" boxref="abc345">
 <tin tinid="429" tinqty="5" tintype="tin"/>
 <box BoxID="1267" boxref="abc567"/>
 <box BoxID="1812" boxref="abc543">
 <tin tinid="430" tinqty="10"/>
 <tin tinid="434" tinqty="12"/>
 <box BoxID="1813" boxref="abc987"/>
 <box BoxID="1816" boxref="abc912">
 <tin tinid="105" tinqty="10"/>

This is my attempt at the stylesheet:

<xsl:stylesheet version="1.0" xmlns:xsl="";>
  <xsl:template match="/">		
		<table border="1">
<xsl:for-each select="//box">
    <TH><xsl:value-of select="@boxref" /></TH>

<xsl:for-each select="//box">
<xsl:for-each select="//box/tin">
<xsl:variable name="cur" select="//box/tin/@tinid"/>
<!--<xsl:if test="not(node())"><td></td></xsl:if>-->
  <xsl:if test="//box/tin">
      <xsl:when test="//box/tin/@tinid">
          <xsl:value-of select="@tinid"/>

Many thanks,


Email provided by

 XSL-List info and archive:

Current Thread