What i want to acheve is:
if i have the following xml node i.e.
<><><><><<><><><><><<><><><><<><><><><><
<names option1="john" option2="peter"/>
<><><><><<><><><><><<><><><><<><><><><><
First of all check if the attribute "option1" exists(How do i do this?),
it's not a must it will be there. And if it does,
set the variable x = 400 - ( No.of option1 * 10 )
Given that the variable had been declared earlier.
-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com]On Behalf Of
David
Carlisle
Sent: 12 February 2003 18:36
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Variables
How can i perform the following operation in xslt.
<xsl:if test=(_at_)steve != 0>
x= x + 1
</xsl:if>
where x is a variable.
if x = x + 1 then 0 = 1 and the world would be inconsistent.
this would be bad, so XSLT, like other declarative programing languages
doesn't let you change the value of a variable once it is bound.
This is a FAQ.
If you said what you were trying to generate rather than which illegal
operation you were trying to peform, someone could offer some further
help.
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list