How can I do some simple loops in XSLT and make counter updates..
Heres what im' working on::
Code:
<xsl:for-each select="events/event">
<xsl:for-each select="dates/date">
<xsl:variable name="firstDate" select="concat(substring($currentDate, 1,4),substring($currentDate, 6,2),substring($currentDate,9,2))"/>
<xsl:variable name="secondDate" select="concat(substring(., 1,4),substring(., 6,2),substring(.,9,2))"/>
<xsl:if test="$secondDate > $firstDate">
<div class="event">
<div class="event_tout" id="event_tout4">
<script type="text/javascript">
pngpong.serveButtonPopup("event_tout4","images/vwe_tout3.png","images/vwe_tout3.png","http://www.dubwars.com/2007/index.htm","");
</script>
</div>
<div class="event_content">
<div class="event_header">
<div id="dub_wars" class="event_title text_blue"><a href="http://www.dubwars.com/2007/index.htm" target="_blank"><xsl:value-of select="../title" /></a></div>
<div class="event_location text_grey_dark"><xsl:value-of select="../location" /></div>
</div>
<div class="event_date text_grey_dark"><xsl:value-of select="." /></div>
<div class="event_body">
This is the only car show where you can take your V-dub in a closed course and drift, spin and burnout to your heart's content. They call it Hooliganism, we call it some of the most fun you can have in a VW.
</div>
</div>
</div>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
This line::
<div class="event_tout" id="event_tout4">
<script type="text/javascript">
pngpong.serveButtonPopup("event_tout4","images/vwe_tout3.png","images/vwe_tout3.png","http://www.dubwars.com/2007/index.htm","");
</script>
</div>
I need to be updating the value of event_tout4, to count from 1-~
At the same time I need to be writing new image values in the pngpong.serverButton.. javascript..
See what i'm going for?
Thanks for any help..