Guest Tejas Posted April 20, 2007 Share Posted April 20, 2007 I am new to XSL. I face some problem xsl. In my application I need to calculate Weighted average. Here I need to store summation in temporary variable. But I came to know that, I can't re-assign value of a variable in XSL!!!(How it's named variable??! ) Does anybody know the workaround for the same? Link to comment Share on other sites More sharing options...
boen_robot Posted April 20, 2007 Share Posted April 20, 2007 The xsl:variable is only made as a temporary store for data that would otherwise be hard to get in a match.The xsl:param can be changed once per template. If you really need to change a value that often, you can create a template that calls itself with the new value as a parameter of it, possibly executing another template on a certain condition.Btw, XSLT 2.0 has the avg() function, ideal for finding the average value in a node-set. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now