Subject: Re: [xsl] variable not found From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx> Date: Thu, 27 Mar 2008 13:52:21 +0530 |
On 3/27/08, Z W <mpc8250@xxxxxxxxx> wrote: > [xslt] Variable $timeSpan has not been declared > > > <xsl:template name="currentJTLDetail"> > > <xsl:for-each select="document($currentJTL)/testResults/*[not(@label = > preceding::*/@label)]"> > <tr> > <xsl:variable name="timeSpan" select="$maxTimeStamp_prev - > $minTimeStamp_prev" /> > </xsl:for-each> > > <td> > <xsl:call-template name="display-seconds"> > <xsl:with-param name="value" select="$timeSpan" /> > </xsl:call-template> > </td> > </tr> > > > </xsl:template> Your stylesheet doesn't seem to be well-formed. Perhaps, you need something like: <xsl:for-each .. <tr> <xsl:variable name="timeSpan" select="$maxTimeStamp_prev - $minTimeStamp_prev" /> <td> <xsl:call-template name="display-seconds"> <xsl:with-param name="value" select="$timeSpan" /> </xsl:call-template> </td> </tr> </xsl:for-each> You have <tr> & </tr> tags at wrong places, and this will fail at the XML parsing stage. -- Regards, Mukul Gandhi
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] variable not found, Z W | Thread | Re: [xsl] variable not found, Ruud Grosmann |
[xsl] How to store value in a varia, Z W | Date | Re: [xsl] variable not found, Ruud Grosmann |
Month |