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

RE: XSLT: SUM function Not working.

Subject: RE: XSLT: SUM function Not working.
From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Feb 2002 09:24:47 +0100 (MET)
xslt sum
Out of curiosity:

What do you intend with the following code:

> <xsl:param name="CurrentSymbol" select="Symbol[position()=current()]"/>

particularly with "Symbol[position()=current()]"

position() returns the position in the current node list (a number)
current() returns the current node (the context node of the template)

Your code selects that Symbol element whose position is equal to the
value of the current node.
(I believe there is no such node.)

Another remark: passing current() as parameter value is unnecessary
because current() outside of a predicate is always the same as .
So, you can pass . instead or forget that parameter at all, since
you never pass any other value. The current node is available in the 
called template in the same manner with ., because calling a template
via xsl:call-template doesn't change the context node.

Hope that helps,
Oliver


/-------------------------------------------------------------------\
|  ob|do        Dipl.Inf. Oliver Becker                             |
|  --+--        E-Mail: obecker@xxxxxxxxxxxxxxxxxxxxxxx             |
|  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |
\-------------------------------------------------------------------/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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.