[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Add Variables accross sibling Node

Subject: Add Variables accross sibling Node
From: Rhonda Fischer <rhonda@xxxxxxxxxxxxxx>
Date: Wed, 03 May 2000 09:53:12 +0000
accross 700
Aim: Create a table of Milestones and tasks
--------------------------------

    Website Development       Cost
            Task 1                                200
            Task 2                                400
            Task 3                                700
        Subtotal                                1300
    Strategy Plan
            Task 1                                400
             etc.......
            Total

My xml file
---------

<Milestone>

    <MilestoneHeading
            heading="Website Development"/>

     <Task
            desc="Task1"
            cost="200" />

    <etc......


Approach One:
============

    * Recurse through milestones and loop through tasks per milestone
    * Success achieved: able to print milestone and task descriptions
    * Problems experienced: not sure how I can add attributes
        accross sibling nodes.
    * My attempt:

        <xsl:if test="following-sibling::Task">
            <xsl:variable name="sumofTaskCost"
                                    select="@cost +
@cost/following-sibling::Task[position()=1]"/>

    * Question: is there an equivalent notion that might work.


Approach Two:
===========

    * Recurse through milestones and recurse through tasks per milestone

    * Problems experienced: as yet able to print out milestones
descriptions
        but not task descriptions
    *  I need to pass the sumofTaskCost back to the calling template, I
am
        of the understanding that as variables cannot be updated this is
not
        possible?


Regards
Rhonda


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.