Re: [xsl] Recursive call trouble

Subject: Re: [xsl] Recursive call trouble
From: Luke Jones <ljones@xxxxxxxxxxxxxxxxxx>
Date: Wed, 09 Aug 2006 15:38:48 -0500
Thanks for the help.  I've made some changes according to what you've
provided.  Now when the template is called I'm getting an unknown XSLT
error.  I'm using Xalan as my parser.

Here is the modified xsl.  I'm also going to show where the template is
being called.  Maybe that is causing the problem. 

=====XSL======


<!-- How I'm trying to start the Recursive call -->
<xsl:template match="floordoc">
...
<title>
<xsl:call-template name='intro'/>
</title
...
</xsl:template>



<!-- The modified Recursive call -->
<xsl:template match="floordoc/bill/title" name="intro">
	<xsl:param name = "start" select="1" />
	<xsl:param name = "end" select="60" />
	<xsl:param name = "ln" select="1" />
	<xsl:variable name="num" select="string-length(.)" />
		<line number='{$ln}'>
			<xsl:choose>
				<xsl:when test="$end &gt; $num">
					
<xsl:value-of  select="substring(floordoc/bill/title/para/text(),
$start)"/>
				</xsl:when>
				<xsl:otherwise>

  <!-- Here I was unsure if the select should have been
select="substring(.,$start,60)" or as it is.  I tried it both ways, and
I still got the error -->

					<xsl:value-of select="substring(floordoc/bill/title/para/text(),
$start,60)"/>
				</xsl:otherwise>
			</xsl:choose>
		</line>
			<xsl:call-template name="intro">
				<xsl:with-param name = "start" select='$start+60'/>
			<xsl:with-param name = "end" select='$end+60'/>
			<xsl:with-param name = "ln" select= '$ln+1'/>
		</xsl:call-template>
	</xsl:template>
</xsl:stylesheet>

Thanks again for the help!

Current Thread