[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Dereferencing not working in certain context

Subject: [xsl] Dereferencing not working in certain context
From: "Andrew Maclean" <andyjmaclean@xxxxxxxxxxx>
Date: Mon, 26 Jan 2004 15:11:25 +0000

Dear all,

I'm having a problem dereferencing a variable in xsl. Getting the value of the "count" value (count is a parameter) works in some contexts but not in others. A straightforward deref using the dollar sign works on it's own, but when I put that inside a larger expression it stops working. I illustrate what I mean below:

Values for <xsl:value-of select="$count"/> =
<xsl:value-of select="exsl:node-set($A)/derivedType[4]/@typeName"/> =
<xsl:value-of select="exsl:node-set($A)/derivedType[$count]/@typeName"/>

The output of this is:

Values for 4 = TypeD = TypeA

But when count is equal to 4, the variable part of the result should be the same the as the hard-coded "4" part of the result. Could someone please tell me why it doesn't work?


Mr Andrew Maclean

Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo

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

Current Thread