如何全局使用XSL变量 [英] How to use the XSL variable Globally

查看:95
本文介绍了如何全局使用XSL变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何在全局中使用声明变量并在 XSLT
中将其用于其他地方 请看我的代码黑色

hi ,

how to use the declare the variable in globally and use it other palce in XSLT
please see my code black

	<xsl:for-each select ="//DATEINFORMATION">
<xsl:variable name ="TotalAllMonthDaysOverrides" select ="$TotalAllMonthDays - $TotalOverrides"/>
<xsl:variable name="OverrideRate" select="$TotalAllMonthDaysOverrides"></xsl:variable>
</xsl:for-each>



这里的$ TotalAllMonthDays和$ TotalOverrides包含一些整数值..
现在如何在每个循环的外侧使用 OverrideRate 变量.
并且如果每次循环都需要添加 TotalAllMonthDaysOverrides 值并将其存储到 OverrideRate 变量中.
这意味着
OverrideRate = TotalAllMonthDaysOverrides + TotalAllMonthDaysOverrides



Here the $TotalAllMonthDays and $TotalOverrides containing some integer values ..
now how can i use the OverrideRate variable at out side of the for each loop.
and also if every time the loop inside i need to add the TotalAllMonthDaysOverrides value and store into the OverrideRate variable.

That means
OverrideRate = TotalAllMonthDaysOverrides + TotalAllMonthDaysOverrides

推荐答案

TotalAllMonthDays-
TotalAllMonthDays -


TotalOverrides"/> < xsl:variable name ="OverrideRate" select ="
TotalOverrides"/> <xsl:variable name="OverrideRate" select="


TotalAllMonthDaysOverrides"></xsl:variable> </xsl:for-each>
TotalAllMonthDaysOverrides"></xsl:variable> </xsl:for-each>



在这里



Here the


这篇关于如何全局使用XSL变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆