[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: variable not found

Subject: Re: variable not found
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Thu, 27 Mar 2008 13:52:21 +0530
Re:  variable not found
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.