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

Re: xsl:param error

Subject: Re: xsl:param error
From: Joerg Pietschmann <joerg.pietschmann@xxxxxx>
Date: Thu, 15 Nov 2001 19:45:49 +0100
what is a param error
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) <=

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.