Re: [xsl] Problem w/ call-template

Subject: Re: [xsl] Problem w/ call-template
From: "NILESH PATEL" <jayganesh786@xxxxxxxxxxx>
Date: Thu, 30 May 2002 07:41:19 +0000
Hi Kim,

I think even then it will still complain about template name do not match or something. I think your xsl fragment should look like this. Correct me if I am wrong, as I am not really a master in xsl.

<xsl:template match="String">
	***<xsl:call-template name="lastSubString">
		<xsl:with-param name="originalString" select="."/>

<xsl:template name="lastSubString">
	<xsl:param name="originalString"/>
     		<xsl:when test="contains($originalString,',')">
      			<xsl:call-template name="lastSubString">
                		<xsl:with-param name="originalString"
  	  Last substring: <xsl:value-of select="$originalString"/>

See if this works, which I am preety sure(99.9%) will work. Let me know the resultplease so I can judge myself.

Thanks, kepp the good work going.

Nilesh Patel

From: Peter Davis <pdavis152@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Problem w/ call-template
Date: Wed, 29 May 2002 19:53:13 -0700

Hash: SHA1

On Wednesday 29 May 2002 16:11, Kim wrote:
> Hi,
> I got an error msg: Could not find template named: "lastSubString". It is
> from the "***" line. What am I missing here? I checked the spelling; it
> is fine.
> </xsl:template>
> </xsl:template>

You have defined the "lastSubString" template *within* another template.
Really you shouldn't have gotten this far -- <xsl:template> must be a
top-level element (that is, a child of <xsl:stylesheet>).  Simply move the
"lastSubString" template outside of the other template and it should work.

- --
Peter Davis
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see


XSL-List info and archive:

MSN Photos is the easiest way to share and print your photos:

XSL-List info and archive:

Current Thread