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

Variable Scope and xsl:if

Subject: Variable Scope and xsl:if
From: Omar López Ruiz <omar@xxxxxxxxxxxx>
Date: Tue, 18 Apr 2000 11:42:30 +0200
xsl if variable scope
    Hi all,

    Imagine some code like this:

    <xsl:template matches="whatever">
      <xsl:if test="something=true">
        <some xsl tags and xsl:call templates>
        <xsl:variable name="foo" select="true">
      </xsl:if>
      <xsl:if test="something=false">
        <some other xsl tags>
        <xsl:variable name="foo" select="false">
      </xsl:if>
      <xsl:value-of select="$foo"/>    <!-- There's no foo var!!-->
    </xsl:template>

    It's clear I can't query this variable from outside the <xsl:if>
because of the variable scope, so, what's the solution?

    Thanks in advance,

    Omar
begin:vcard 
n:López Ruiz;Omar
tel;fax:(34) 93 363 79 98
tel;work:(34) 93 363 79 86
x-mozilla-html:FALSE
url:www.informix.com/es
org:Informix Software Ibérica;Web Solutions Division
adr:;;Av. Diagonal, 615 8-F;Barcelona;;08028;Spain
version:2.1
email;internet:omar@xxxxxxxxxxxx
title:Pre-sales Engineer
x-mozilla-cpt:;-28176
fn:Omar López Ruiz
end:vcard
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.