This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: xsl:param error
- From: "Annalisa Ricci" <Annalisa dot Ricci at loria dot fr>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 15 Nov 2001 18:24:49 +0100
- Subject: Re: [xsl] xsl:param error
- References: <20011115164614.1856.cpmta@c011.sfo.cp.net>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Try using <xsl:variable> instead of<xsl:param>
----- Original Message -----
From: "Vaibhava" <vaibhava@muchhal.com>
To: <xsl-list@lists.mulberrytech.com>
Sent: Thursday, November 15, 2001 5:46 PM
Subject: [xsl] xsl:param error
> I am attempting to set a counter using the XSL:param method.
> The following is my XSL code :-
> <?xml version='1.0'?>
> <!--<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">-->;
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
> <xsl:template match="/banners">
> <xsl:param name="count">0</xsl:param>
> <xsl:value-of disable-output-escaping="yes"
select="count(bannerlist/banner)" />
> <HTML>
> <BODY>
> <TABLE>
> <xsl:for-each select="bannerlist/banner">
> <xsl:param name="count" expr="count+1"></xsl:param>
> <TR>
> <TD>
> <xsl:value-of disable-output-escaping="yes" select="IMAGE" />
> </TD><TD> </TD><TD>
> <xsl:value-of disable-output-escaping="yes" select="HREF" />
> </TD><TD> </TD><TD>
> <xsl:value-of disable-output-escaping="yes" select="$count" />
> </TD>
> </TR>
> </xsl:for-each>
> </TABLE>
> </BODY>
> </HTML>
> </xsl:template>
> </xsl:stylesheet>
>
> I get the following error when the code processes :-
> "Description: Keyword xsl:param may not be used here."
>
> Please help as to why this may be happening...
>
> Thanks
>
> -Vaibhava Muchhal
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list