[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

passing node-set through multiple templates

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

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"/>
	</xsl:call-template>
	
</xsl:template>


... 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"/>
		</xsl:call-template>	
	</xsl:if>
</xsl:template>


... 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]"/>
</xsl:template>

... 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 ...



silvan

-- 


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.