[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Recursive call trouble
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 > $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!
|
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
|