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

Re: recursive loop in XSL stylesheet is failing

Subject: Re: recursive loop in XSL stylesheet is failing
From: George <news.net@xxxxxxx>
Date: Thu, 25 Mar 2010 14:31:19 +0100
Re:  recursive loop in XSL stylesheet is failing
Thanks, David.

You are right, I do not want that the two params hold the same value.

So, I guess instead of
...
<xsl:template match="Entry">
<xsl:variable name="catid" select="CategoryID"/>
<xsl:param name="parentcatid" select="document('Categories.xml')/Categories/Category[@ID=$catid]/@ParentID"/>
<xsl:param name="parentcat"><xsl:value-of select="CategoryName"/></xsl:param>
<xsl:call-template name="ParentCategories">
<xsl:with-param name="parentcatid" select="."/>
<xsl:with-param name="parentcat" select="."/>
</xsl:call-template>
...


I have to put it like that
...
<xsl:template match="Entry">
<xsl:variable name="catid" select="CategoryID"/>
<xsl:call-template name="ParentCategories">
<xsl:with-param name="parentcatid" select="document('Categories.xml')/Categories/Category[@ID=$catid]/@ParentID"/>
<xsl:with-param name="parentcat" select="select="CategoryName""/>
</xsl:call-template>
...


How can I update a var with each cycle of the iterative loop?
It should be something like:
$i = $i + ''

Thanks in advance.
George

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.