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

tough problem: infinit loop caused by XSL recusive cal

Subject: tough problem: infinit loop caused by XSL recusive call
From: "Di Luo" <dluo@xxxxxxxxxxxxxxxx>
Date: Fri, 18 May 2001 12:03:04 -0400
xsl recusive
Hi,

1. I try to transform a XML file to a text file by using transform class of
xalan 2.0.
2. I call the following template with countLoop select="14" that cause the
infinite loop and stack overflow,
however if I set select="8" it works fine.

3. Does anyone know how to the reason? How to fix it? Is there any
properties file which define the default stack size for xalan 2.0?

Thank you in advance!

DI



	<xsl:call-template name="data-field-loop">
			<xsl:with-param name="count" select="1"/>
			<xsl:with-param name="countLoop" select="14"/>
			<xsl:with-param name="MessageType" select="concat($MessageType,
'_DATA-')"/>
     	    		<xsl:with-param name="ScreenNo" select="$ScreenNo" />
       	      <xsl:with-param name="FieldSize" select="20" />
    	</xsl:call-template>



    <xsl:template name="data-field-loop">
	    <xsl:param name="count"/>
	    <xsl:param name="countLoop"/>
 	    <xsl:param name="MessageType"/>
	    <xsl:param name="ScreenNo"/>
	    <xsl:param name="FieldSize"/>
        <xsl:variable name="MappingField" select="concat($MessageType,
$count,'-', $ScreenNo )" />
	    <xsl:if test="$count &lt;=  $countLoop">
             <xsl:variable name="maint" select="key('key-name',
concat(generate-id(), ':', $MappingField))" />
             <xsl:call-template name="format-string">
                    <xsl:with-param name="value"
select="$maint/@newFieldValue"/>
                    <xsl:with-param name="size" select="$FieldSize"/>
             </xsl:call-template>

		    <xsl:call-template name="data-field-loop">
			    <xsl:with-param name="count" select="$count + 1"/>
  			    <xsl:with-param name="countLoop" select="$countLoop"/>
			    <xsl:with-param name="MessageType" select="$MessageType"/>
        	    <xsl:with-param name="ScreenNo" select="$ScreenNo" />
       	        <xsl:with-param name="FieldSize" select="$FieldSize" />
	        </xsl:call-template>
	    </xsl:if>
    </xsl:template>


 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.