[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Variable declaration

Subject: Variable declaration
From: Tomas Olsson <tomas.olsson@xxxxxxxxxxxxx>
Date: Thu, 21 Sep 2000 07:55:18 +0200
variable declaration
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="http://www.w3.org/1999/XSL/Transform"
                version="1.0">
	
	<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"/> 
	</xsl:template>
</xsl:stylesheet>


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:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.