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

Assigning a value to a variable failure

Subject: Assigning a value to a variable failure
From: "tom tom" <tomxsllist@xxxxxxxxxxx>
Date: Mon, 21 Feb 2005 22:07:57 +0000
xsl assigning variables
If I have the following variables:

<xsl:variable name="section_num2">
 <xsl:choose>
   <xsl:when test="/ROOT/PARAMS/PARAM[NAME='s_id']">
	<xsl:value-of select="/ROOT/PARAMS/PARAM[NAME='s_id']/VALUE"/>
   </xsl:when>
   <xsl:otherwise>1</xsl:otherwise>
 </xsl:choose>
</xsl:variable>

<xsl:variable name="section_num" select="number($section_num2)"/>

I have a further variable and template:

<xsl:variable name="current_page">
<xsl:call-template name="find_current_page"/>
</xsl:variable>

<xsl:template name="find_current_page">
<xsl:value-of select="$section_num2"/>
</xsl:template>

When i reference the variable $current_page, the value of $section_num2 is not returned, nothing is returned, yet when I call the template name 'find_current_page' directly the correct value is returned, can anyone tell me why? I am using MSXML 3 in XML Spy, these templates are part of a much larger stylesheet, they are definately not being overridden anywhere.

Thanks

Tom

_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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

Buy Stylus Studio Now

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-2013 All Rights Reserved.