This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How can I use a variable out of it scope ?





>From: "viewga" <viewga@phreaker.net>
>Reply-To: xsl-list@lists.mulberrytech.com
>To: <xsl-list@lists.mulberrytech.com>
>Subject: Re: [xsl] How can I use a variable out of it scope ?
>Date: Wed, 31 Jan 2001 11:44:26 +0200
>
>You can use some trick like that:
>(thats not exactly what you want, but ...)
><xsl:template match="level1">
><xsl:variable name="myVar">Something</xsl:variable>
><xsl:call-template name="level2">
><xsl:with-param name="upperLevelVar"><xsl:value-of select="$myVar"
>/></xsl:with-param>
></xsl:call-template>
></xsl:template>
>
><xsl:template name="level2">
><xsl:param name="upperLevelVar"/>
><!-- doing with upperLevelVar -->
></xsl:template>
>

O.K. it works fine ! But how can I call upperLevelVar on a JavaScript 
function argument ?

The following code ...

<IMG SRC="images/open.gif">
  <xsl:attribute name="onDblClick">
   SetNode('<xsl:value-of select="$upperLevelVar"/>');
   </xsl:attribute>
</IMG>

... creates this html ouput :

<IMG SRC="mygif.gif" onDblClick=""></IMG>



_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]