开发者

Using Global variable

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜