开发者

Using Global variable

开发者 https://www.devze.com 2023-02-13 16:19 出处:网络
This is my portion of xml input. <w:tc> first </w:tc> <w:tc> second </w:tc> I am using xslt1.0开发者_JAVA百科 and my template is

This is my portion of xml input.

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

I am using xslt1.0开发者_JAVA百科 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>


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

This is not possible.

See answers to these similar questions:

  • In XSLT how do I increment a global variable from a different scope?
  • if defined in XSLT
  • Actually XSLT Lookup (Store variables during loop and use in it another template)
  • In XSLT how do I increment a global variable from a different scope?
  • XSL global value assignment
0

精彩评论

暂无评论...
验证码 换一张
取 消