Vaibhava <vaibhava@xxxxxxxxxxx> wrote
> I am attempting to set a counter using the XSL:param method.
[...]
> <xsl:for-each select="bannerlist/banner">
> <xsl:param name="count" expr="count+1"></xsl:param>
Well, xsl:param may not be used there. You can't set counters
this way. You don't need to in your case. XSLT is not JavaScript.
Replace the faulty line by
<xsl:variable name="count" select="position()"/>
and drop the line with <xsl:param name="count">0</xsl:param>,
you should now see increasing values in the last column in
your generated table.
You can, of course, use position instead of $count directly (be
aware that there are traps if you do so). Get a good XSLT book
and study these topics more extensively.
BTW you are using disable-output-escaping in a dangerous way.
Delete all occurences immediately.
HTH J.Pietschmann
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- RE: xsl:param error, (continued)
- Vaibhava - Thu, 15 Nov 2001 12:32:10 -0500 (EST)
- Jeff Beadle - Thu, 15 Nov 2001 12:36:27 -0500 (EST)
- Vaibhava - Thu, 15 Nov 2001 13:06:29 -0500 (EST)
- Joerg Pietschmann - Thu, 15 Nov 2001 13:45:30 -0500 (EST) <=
|
|