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>