W3C home > Mailing lists > Public > xsl-editors@w3.org > April to June 2000

Access global variables

From: Fredrik Gustafsson <fredrik@infomaker.se>
Date: Tue, 13 Jun 2000 13:52:32 +0200
Message-ID: <004701bfd52d$dbaac630$4a58f7d4@infomaker.se>
To: <xsl-editors@w3.org>
Hi,
I just wonder how If its possible to change the global variables?
Is it possible to get the values from a variable declared in a template?

Or:
How can I make this work? I just want to save the value of some variables. First I send one value to save, but then I would like to get it out. I would like it to be something like this. But this doesn't work. I can't get the value that have been saved. 
Thats why I would like to work with global variables in the first place.

<!-- My template -->
<xsl:template name="variables">
<xsl:param name="tag"></xsl:param>
<xsl:param name="value"></xsl:param>
<xsl:param name="way"></xsl:param>

<xsl:if test="$tag='dateline'">
<xsl:variable name="dateline">
<xsl:if test="$way='in'"><xsl:value-of select="$value"/></xsl:if>
</xsl:variable>
<xsl:if test="$way='out'"><xsl:value-of select="$dateline"/></xsl:if>
</xsl:if>
</xsl:template>

/Fredrik
Received on Tuesday, 13 June 2000 07:53:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:50 GMT