[xsl] Recursive call trouble

Subject: [xsl] Recursive call trouble
From: Luke Jones <ljones@xxxxxxxxxxxxxxxxxx>
Date: Wed, 09 Aug 2006 14:06:19 -0500
Hi,

I'm having trouble making my call work at all.  What I'm trying to do is
break down a large paragraph into single lines of sub-strings.  Here is
what my xsl segment currently looks like:

====XSL=====

<xsl:param name = "start">1</xsl:param>
<xsl:param name = "end">60</xsl:param>
<xsl:param name = "ln">1</xsl:param>

<xsl:template match="fdoc/bl/title" name="intro">
		<xsl:variable name = "num"
select="string-length(fdoc/bl/title/para/text())" />
		
		<title>
			<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>
						<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>
		</title>
	</xsl:template>


Thanks!

Current Thread