RE: [xsl] xsl:variable question

Subject: RE: [xsl] xsl:variable question
From: "Long Zhao" <LZhao@xxxxxxxxxxxxxxxx>
Date: Thu, 20 Dec 2001 09:17:51 -0600
I am using oracle v2.

could you give some comments on which paser is the best?

thanks

Long

-----Original Message-----
From: Michael Kay [mailto:michael.h.kay@xxxxxxxxxxxx]
Sent: Thursday, December 20, 2001 4:49 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] xsl:variable question


They are both wrong, the variable $mode is out of scope in both cases.
Which
XSLT processor are you using that allows this?

Mike Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Long Zhao
> Sent: 19 December 2001 21:28
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] xsl:variable question
>
>
> hi everyone
>
> here are two xsl files :
>
> <xsl:template match="/">
> 	<xsl:variable name="mode">1</xsl:variable>
> 	......
> </xsl:template>
>
> <xsl:template name="dosomething">
> 	<xsl:if test="$mode='1'">
> 		.....
> 	</xsl:if>
> 	.....
> </template>
> ------------------------------------
> <xsl:template match="/">
> 	<xsl:variable name="mode" select='1'/>
> 	......
> </xsl:template>
>
> <xsl:template name="dosomething">
> 	<xsl:if test="$mode='1'">
> 		.....
> 	</xsl:if>
> 	.....
> </template>
>
> why the first one does not work, but the second one works.
>
> am i doing anything wrong in the first xsl?
>
> thanks
>
> Long
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


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


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


Current Thread