cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henning von Bargen <H.vonBar...@Triestram-Partner.de>
Subject AW: problems counting in loops
Date Tue, 24 Oct 2000 10:21:00 GMT
This may be completely wrong, I am absolutely not sure,
but AFAIK a variable in XSL is not comparable to a variable in java (for
example).
A variable in XSL is more or less an abbreviation for a more complex
expression,
and it is defined to be immutable (its more like in a functional programming
language).
Henning

> -----Urspr√ľngliche Nachricht-----
> Von:	Bas Passon [SMTP:BPasson@parite.nl]
> Gesendet am:	Dienstag, 24. Oktober 2000 11:37
> An:	Cocoon Mailinglist (E-mail)
> Betreff:	problems counting in loops
> 
> Hello, 
> 
> I have got a small problem, counting in xsl, see the following fragment of
code 
> 
>         <xsl:variable name="count" select="1"/> 
>         <xsl:for-each select="item"> 
>                 ...do something 
>                 <xsl:variable name="count" select="$count+1"/> 
>         </xsl:for-each> 
> 
> for some reason the count variable stays 1. What am i doing 
> wrong. I looked at the XPath docs, but this is a valid 
> expr. 
> 
> Thnx 
> 
> Bas 
> 

Mime
View raw message