Rowcount

Tomislav Bilic <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization T-Com
Message-ID <[email protected]>
Hello guys.

I have a rather simple problem, but after a lot of research I couldn't 
find right answer.

This is the XSL sample and it works perfectly. It gets elements from XML 
file.

But, I would like to have line 3 changed for each iteration.

iteration 1 : <div class="no1">
iteration 2 : <div class="no2">
iteration 3 : <div class="no3">

The question is, how to set a variable and increment it by 1 every 
iteration.


<xsl:for-each select="dataroot/portfolio">
   <div class="portfolio_element">
     <div class="no1">
     <h4><xsl:value-of select="title"/></h4>
     <div class="portfolio_ss">
     <xsl:element name="img">
     <xsl:attribute 
name="src"><xsl:text>images/portfolio/</xsl:text><xsl:value-of 
select="icon"/></xsl:attribute>
     <xsl:attribute name="width"><xsl:text>90</xsl:text></xsl:attribute>
     <xsl:attribute name="height"><xsl:text>79</xsl:text></xsl:attribute>
     </xsl:element>
     </div>
   </div></div>
</xsl:for-each>


TNX in advance.
-- 
Tomislav Bilic
Escape d.o.o.
http://www.escapestudio.net
--
GSM: +385 91 577 1025
ICQ: 1824223
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.