[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Recursive call trouble

Subject: Re: Recursive call trouble
From: Luke Jones <ljones@xxxxxxxxxxxxxxxxxx>
Date: Wed, 09 Aug 2006 15:38:48 -0500
recursive call xsl
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.