[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Continuously add to a parameter at each call
I am using xsl to manipulate data contained in a MS Project file and my issue is with adding the total cost of certain tasks. Currently I am checking through all tasks to meet a certain condition and when there is a match I want to obtain the cost of the task and set that value to a parameter. My desired end result should calculate the total cost of all tasks that satisfy the condition. Based on the code below, I calculate the cost of a task if the first two "if" statements are satisfied. I want to have a parameter that I can update everytime I get the cost of a task and keep a running total of the overall cost. Can someone tell me what the code should be inside the template "TotalCost" to keep a running total of the cost??? <xsl:if test="$task_uid = $temp_task_id"> <!-- Compare ID related to Assignment --> <xsl:if test="$task_wbs = $temp_task_wbs"> <!-- Seperate low-level tasks according to top-level --> <xsl:variable name="Cost" select="*[local-name()='Cost']" /> <xsl:call-template name="TotalCost"> <xsl:with-param name="Tot_Cost" select="$Cost"/> </xsl:call-template> I've been trying this for two days and cannot get a good result, so any help is very much appreciated Thankyou Emil S.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|