0

This is my portion of xml input.

<w:tc> 
   first 
</w:tc> 
<w:tc> 
   second 
</w:tc> 

I am using xslt1.0 and my template is

<xsl:template match="tc"> 
  <!-- When the first match occurs, i am setting a value for a 
       global variable and when the template matches for second time, 
       i have to fetch the value from that variable -->  
</xsl:template>
Tomalak
  • 332,285
  • 67
  • 532
  • 628
vignesh
  • 1,573
  • 7
  • 33
  • 60
  • possible duplicate of [In XSLT how do I increment a global variable from a different scope?](http://stackoverflow.com/questions/833118/in-xslt-how-do-i-increment-a-global-variable-from-a-different-scope) –  Feb 24 '11 at 12:54

1 Answers1

0

When the first match occurs, i am setting a value for a global variable

This is not possible.

See answers to these similar questions:

Community
  • 1
  • 1
Tomalak
  • 332,285
  • 67
  • 532
  • 628
  • So, this would be a duplicate? –  Feb 24 '11 at 12:53
  • @Alejandro: Probably, yes - in its current state. If the OP adds specific question, a better answer than "not possible" could be written - one that could stand on its own. – Tomalak Feb 24 '11 at 15:14
  • We already have some experience with [@vignesh](http://stackoverflow.com/users/514227/vignesh)'s questions... –  Feb 24 '11 at 15:24
  • @Alejandro: I see. Very well. I've voted to close as a duplicate. – Tomalak Feb 24 '11 at 17:06