Re: [xsl] Recursive call trouble

Subject: Re: [xsl] Recursive call trouble
From: Steve <subsume@xxxxxxxxx>
Date: Wed, 9 Aug 2006 17:32:00 -0400
Ayeum, your parser is the best source for support on an outright
error. "Unknown error" can really be anything. Elab?


On 8/9/06, Luke Jones <ljones@xxxxxxxxxxxxxxxxxx> wrote:
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.


<!-- 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:when test="$end &gt; $num">

<xsl:value-of  select="substring(floordoc/bill/title/para/text(),

  <!-- 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(),
                        <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'/>

Thanks again for the help!

Current Thread