[xsl] passing node-set through multiple templates

Subject: [xsl] passing node-set through multiple templates
From: silvan <silvan@xxxxxxxxx>
Date: Fri, 30 May 2003 16:12:10 +0200

Im having the following situation;

- A template which calls template 'Display' with
  a node-set as parameter ...

<xsl:template match="/">
	<xsl:call-template name="Display">
		<xsl:with-param name="rows" select="//path/to/nodes"/>

... template Diplay kindly gets $rows, does some
further magic and is supposed to call template 'Display_ext' 
with again $rows and an additional value ...

<xsl:template name="Display">
	<xsl:param name="rows"/>
	<xsl:variable name="item" select="some_value"/>
	<xsl:if test="$rows">
		<xsl:call-template name="Display_ext">
			<xsl:with-param name="rows" select="$rows"/>
			<xsl:with-param name="item" select="$item"/>

... now, strangely, Display_ext is not able to 
assign $rows[$item], even though
$rows is unchanged ...

<xsl:template name="Display_ext">
	<xsl:param name="rows"/>
	<xsl:param name="item"/>
	<xsl:value-of select="$rows[$item]"/>

... the errormessage is as follows;
XPath error Invalid type in $images[1] ..

Does anyone has an idea on what could be the failure's 
reason or on how one can pass a node-set as variable through multiple templates?
I appologize if this question falls into the 
newbie-section ...



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

Current Thread