Altova Mailing List Archives
>microsoft.public.xsl Archive Home
>Recent entries
>Thread Prev - Re: Generating table
>Thread Next - Re: Generating table
Re: Generating table
To: NULL
Date: 10/4/2003 2:08:00 PM
If I put "tr" into "tablerow" template then that will create a row for every call to that template. Thats' not what I want. "Dimitre Novatchev" <dnovatchev@y...> wrote in message news:bllq5h$dhl3o$1@I...... > > Problem is that second call to a template creates a row > > with both West and East data. I want to have them in > > different rows. Can someone help, please? > > Then put the "tr" element into the "tablerow" template -- not outside of it. > > > ===== > Cheers, > > Dimitre Novatchev. > http://fxsl.sourceforge.net/ -- the home of FXSL > > > > "Mark" <markgoldin@c...> wrote in message > news:0dfc01c38a00$1660edb0$a001280a@p...... > > XML: > > <?xml version="1.0"?> > > <?xml-stylesheet type="text/xsl" href="test.xsl"?> > > <root> > > <categories> > > <category name="May" /> > > <category name="June" /> > > <category name="July" /> > > <category name="August" /> > > <category name="September" /> > > <category name="October" /> > > <category name="November" /> > > <category name="December" /> > > <category name="January" /> > > <category name="February" /> > > <category name="March" /> > > <category name="April" /> > > </categories> > > <dataset seriesname="EAST"> > > <set value="310" /> > > <set value="330" /> > > <set value="323" /> > > <set value="402" /> > > <set value="391" /> > > <set value="421" /> > > <set value="373" /> > > <set value="387" /> > > <set value="403" /> > > <set value="485" /> > > <set value="545" /> > > <set value="516" /> > > </dataset> > > <dataset seriesname="WEST"> > > <set value="261" /> > > <set value="260" /> > > <set value="271" /> > > <set value="312" /> > > <set value="329" /> > > <set value="346" /> > > <set value="341" /> > > <set value="321" /> > > <set value="298" /> > > <set value="381" /> > > <set value="435" /> > > <set value="452" /> > > </dataset> > > </root> > > > > XSLT: > > <?xml version='1.0'?> > > <xsl:stylesheet > > xmlns:xsl='http://www.w3.org/1999/XSL/Transform' > > version='1.0'> > > > > <xsl:output method="html" version="4.0" /> > > <xsl:template match="/"> > > <html> > > <table border="1" width="70%" style="font-size: 10pt; > > border: 0.5 solid #000000" cellspacing="0" > > cellpadding="0" bordercolor="#000000"> > > <tr> > > <xsl:for-each select="//category"> > > <xsl:call-template name="tablerow"> > > <xsl:with-param name="value" select="@name" > > > </xsl:with-param> > > </xsl:call-template> > > </xsl:for-each> > > </tr> > > </table> > > <table border="1" width="70%" style="font-size: 10pt; > > border: 0.5 solid #000000" cellspacing="0" > > cellpadding="0" bordercolor="#000000"> > > <tr> > > <xsl:for-each select="//set"> > > <xsl:call-template name="tablerow"> > > <xsl:with-param name="value" select="@value" > > > </xsl:with-param> > > </xsl:call-template> > > </xsl:for-each> > > </tr> > > </table> > > </html> > > </xsl:template> > > > > <xsl:template name="tablerow"> > > <xsl:param name="value" /> > > <td style="border-right-style: solid; border-right-width: > > 0.5"> > > <xsl:value-of select="$value" /> > > </td> > > </xsl:template> > > </xsl:stylesheet> > > > > Problem is that second call to a template creates a row > > with both West and East data. I want to have them in > > different rows. Can someone help, please? > > > > Thanks > >
Disclaimer
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

