[xsl] storing a variable value using <script> tags in between

Subject: [xsl] storing a variable value using <script> tags in between
From: Rosa I-Ting Cheng <Rosa@xxxxxxxxxxxxx>
Date: Mon, 8 Jan 2001 17:30:22 +1100
Is it possible for me to do the following:

<xsl:variable name="qNum">
<SCRIPT>
parent.qNo;
</SCRIPT>
</xsl:variable>

so as to get the value of the variable qNo equal to qNum?  Cos when I try
this
<xsl:value-of select="$qNum"/>
I get this:
parent.qNo;

while it should be a number....
and when I try this:
<xsl:template
match="Categorydefs/CategoryDef/QuestionDefs/QuestionDef[position()=$qNum]">
I get that "Variables may not be used within this expression.
Categorydefs/CategoryDef/QuestionDefs/QuestionDef[position()=-->$qNum<--]"

Can anyone please help me here?

thanx!! :)

Rosa

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


Current Thread