xsl-list
[Top] [All Lists]

RE: increment value

2004-01-22 11:09:50
Hi Ricardo,

From what I understand, your problem seems to be same as mine: Please check
my posting today: Linear counting problem in nested loop.

I guess you have a nested loop within a loop (just like I have and you need
to set the ids as a linear counter value). I am in the same boat if I
understood you right. Good Luck. I hope someone out there (XSL Guru) may be
able to solve our issues.

Anoop

-----Original Message-----
From: Ricardo Saraiva [mailto:rss(_at_)dee(_dot_)fct(_dot_)unl(_dot_)pt]
Sent: Thursday, January 22, 2004 12:47 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] increment value


Hi,

        That was an example. The numbers were not to be added to the
string.
        Imagine the example without the numbers.

How do I increment a variable to add to the string?

Thanks,

Ricardo Saraiva


-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
Andreas L.
Delmelle
Sent: quinta-feira, 22 de Janeiro de 2004 17:16
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] increment value

-----Original Message-----
From: Ricardo Saraiva


<snip />
      <a>
            <b>1</b>
              <b>2</b>
      </a>

      <a>
            <b>3</b>
              <b>4</b>
      </a>
      
The output would be:
      
      <b id="b1"/> 
      <b id="b2"/> 
      <b id="b3"/> 
      <b id="b4"/> 
      .


Something like:

<xsl:template match="a/b">
  <xsl:element name="b">
    <xsl:attribute name="id">
      <xsl:value-of select="concat(name(.),.)" />
    </xsl:attribute>
  </xsl:element>
</xsl:template>

Cheers,

Andreas


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>