Subject: Re: [xsl] Problem w/ call-template From: "NILESH PATEL" <jayganesh786@xxxxxxxxxxx> Date: Thu, 30 May 2002 07:41:19 +0000 |
<xsl:template match="String"> [...] ***<xsl:call-template name="lastSubString"> <xsl:with-param name="originalString" select="."/> </xsl:call-template> </xsl:template>
<xsl:template name="lastSubString"> <xsl:param name="originalString"/> <xsl:choose> <xsl:when test="contains($originalString,',')"> <xsl:call-template name="lastSubString"> <xsl:with-param name="originalString" select="substring-after($originalString,',')"/> </xsl:call-template> </xsl:when> </xsl:choose> Last substring: <xsl:value-of select="$originalString"/> </xsl:template>
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
-----BEGIN PGP SIGNED MESSAGE----- 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org
iD8DBQE89ZQbNSZCJx7tYycRApLrAJ9Ct6ZyF3pNeSDns/gX4BnR909XEACeNBJf n8Ufsoc9yBxLlzIUToaVplE= =rQpr -----END PGP SIGNATURE-----
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Problem w/ call-template, Peter Davis | Thread | [xsl] Xalan - Stylesheet included u, Mulberry Technologie |
[xsl] xpointers with xsl, Jayaranga Subasinghe | Date | Re: [xsl] Xalan memory limit?! (sol, José León Serna |
Month |