|
Subject: how to change variable values ? From: Gero Nickenig <gnickenig@xxxxxx> Date: Wed, 19 Jul 2000 08:21:54 +0200 (MEST) |
hi,
i got the following problem: i want to output a xml-document with a
xsl-stylesheet. In this output it should, for example, make a line when
the week changes. I tried to do this by using variables...
-------------
<xsl:variable name="lastweek">
<!-- Need an Initial value to compare later with currentweek-->
<xsl:value-of select="Week"/>
<!-- Week is a tag from the xml-document -->
</xsl:variable>
<xsl:for-each select="Data/Block">
<xsl:variable name="currentweek">
<xsl:value-of select="Week"/>
</xsl:variable>
<xsl:if test="$currentweek > $lastweek">
<!-- Do something when week changes and set
the variable lastweek to this week -->
<xsl:variable name="lastweek"> <!-- foo ;-) -->
<xsl:value-of select="$currentweek">
</xsl:variable>
</xsl:if>
.
.
.
</xsl:for-each>
--------------------------
Obviously, it complains, that the variable lastweek cannot be defined
twice. Is there a way to "just change" the variable lastweek (and not
to define it again) ?
Thanks
Gero Nickenig
--
Sent through GMX FreeMail - http://www.gmx.net
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: problems with forms and XSL, Kay Michael | Thread | RE: how to change variable values ?, Ben Robb |
| problems with forms and XSL, Rohit Peyyeti | Date | RE: problems with forms and XSL, Chris Bayes |
| Month |