This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: XSLT: SUM function Not working.
- From: Oliver Becker <obecker at informatik dot hu-berlin dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 14 Feb 2002 09:24:47 +0100 (MET)
- Subject: RE: [xsl] XSLT: SUM function Not working.
- Reply-to: xsl-list at lists dot mulberrytech dot com
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@informatik.hu-berlin.de |
| op|qo WWW: http://www.informatik.hu-berlin.de/~obecker |
\-------------------------------------------------------------------/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list