Variable declaration

Subject: Variable declaration
From: Tomas Olsson <tomas.olsson@xxxxxxxxxxxxx>
Date: Thu, 21 Sep 2000 07:55:18 +0200
I have just recently started using xml and cant seem to get 
my variables to work properly.There is something wrong with my
declaration of the variables myvar1 and myvar2. I do not get any
error messages, but the variables just don't seem to exist when I
try to use them.

This is my stylesheet:

<xsl:stylesheet xmlns:xsl="";
	<xsl:template match="/">
	  	<xsl:variable name="myvar1" select="'content1'"/>
	  	<xsl:variable name="myvar2">content2</xsl:variable>
		This is myvar1: <xsl:value-of select="$myvar1"/>, and 
		this is myvar2: <xsl:value-of select="$myvar2"/> 

Output in the browser:
content2 This is myvar1: , and this is myvar2:

In the declaration of myvar2, "content2" is printed to the screen, 
so it looks like the declaration tags are skipped. And there seems
to be no value stored in myvar1. What am I missing? I have tried
different versions of Internet Explorer and Netscape but that does
not work either.

 XSL-List info and archive:

Current Thread