[xsl] variable declaration

Subject: [xsl] variable declaration
From: Ines.Klimann@xxxxxxxxxxxxxxxx
Date: Mon, 19 Mar 2001 12:48:51 +0100
Hello,

I am trying to use variables in an XSL file and it does not work.

Here is my xml file:
-------------XML file-------------
<?xml version="1.0" standalone="yes"?>

<?xml-stylesheet type="text/xsl" href="toto.xsl"?>

<document>
rien
</document>
----------------------------------

Here is my XSL file :
-------------XSL file-------------
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl";>

<xsl:variable name="toto" select="3" />

<xsl:template match="/">
<center><xsl:value-of select="$toto"/></center>

</xsl:template>
</xsl:stylesheet>
----------------------------------


and this is the message of ie5 :
-----------error message----------
The XML page cannot be displayed 
[...]
Keyword xsl:variable may not be used here. 
----------------------------------



Does someone know what's wrong with my xsl file ?

thanks a lot,
Ines.

---
Ines Klimann
01 44 27 86 64 - bureau 6A31
klimann@xxxxxxxxxxxxxxxx

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


Current Thread