xsl-list
[Top] [All Lists]

Re: increment value

2004-01-22 14:52:27
Hi Ricardo,
The following XSL produces the desired o/p -

<xsl:for-each select="//b">
  <b id="{concat('b',position())}" />
</xsl:for-each>

Regards,
Mukul

 --- Ricardo Saraiva <rss(_at_)dee(_dot_)fct(_dot_)unl(_dot_)pt> wrote: >
Hello,

I want to increment a value to concat to a string. 
For example:

      <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"/> 
      .
      
Can anybody help,
      
Thanks
      
Ricardo Saraiva.



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

________________________________________________________________________
Yahoo! India Mobile: Download the latest polyphonic ringtones.
Go to http://in.mobile.yahoo.com

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



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