xsl-list
[Top] [All Lists]

RE: increment value

2004-01-22 10:15:52
-----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



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