xsl:for-each and variables

Subject: xsl:for-each and variables
From: "Larry Mason" <Larry_Mason@xxxxxx>
Date: Tue, 14 Dec 1999 17:16:51 -0600

Can anyone tell me why the following will not work?


<?xml version="1.0" standalone='no'?>
 <xsl:variable name="temp">data/row</xsl:variable>
 <xsl:template match="/">
   <xsl:for-each select="data/row">
     value is <xsl:value-of select="."/>
   <xsl:for-each select="$temp">
     value is <xsl:value-of select="."/>

If I take out the second for-each everything works.
When I leave it in, the output says "cannot convert to node-set".  Since the
value of temp is
the same as the static for-each (right?), shouldn't the result be the same?  Any

I'm trying to create a template that accepts the tags to process and thus need
the second format.

(using XT from August running on NT using the windows executable)

Any help is GREATLY appreciated.
Larry Mason

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

Current Thread