|
[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
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 <= $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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








