|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] A counter inside a for-each?
I want to write a "/" only if it´s not the first ocurrence of the Field.
So, I have to use a counter (conta14). But when I display the XML, conta14
has everytime the initial value 0. It doesn't change it!
Do you know any solution to this?!?!
...
<xsl:variable name="conta14">0</xsl:variable>
...
<xsl:template match="/">
...
<xsl:for-each select="//Field[@No='606']/Subfield[@No='a']">
<xsl:if test="$conta14!=0">
<xsl:text> / </xsl:text>
</xsl:if>
<xsl:value-of select="."/>
<xsl:value-of select="$conta14"/>
<xsl:variable name="conta14" select="number('$conta14')+1"/>
</xsl:for-each>
...
</xsl:template>
...
Thanks!
Maria Manuel Rodrigues Teixeira
EFACEC Sistemas de Informação, SA
maria.manuel@xxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








