Good afternoon:
I'm newbie with xmltask, but I think that's a great tool.
My question is, how do you recomends work with nested xmltask, that try to
modify nodes, in cascade form.

Ej:

The main call
<target name="remove">
            <xmltask source="...">
                <call path="/root/no...@label and not(@uname)]"
target="_remove-label-nodes">
                    <param name="label" path="@label" />
                    <param name="project-name" value="@{project-name}" />
                    <param name="node-path" value="/root/node" />
                    <param name="initial" value="true" />
                </call>
            </xmltask>
</target>
...
    <target name="_remove-label-nodes">
        <property name="label-path" value="${node-pat...@label='${label}']"
/>
        <echo message="Removing ${label-path} node" />
        <xmltask source="${workspace}/${project-name}/src/nav_menu.xml">
            <call path="${node-pat...@label='${label}']/node"
                target="_remove-uname-nodes">
                <param name="uname" path="@uname" />
                <param name="project-name" value="${project-name}" />
                <param name="node-path"
value="${node-pat...@label='${label}']/node" />
            </call>
        </xmltask>
    </target>
...
<target name="_remove-uname-nodes">
        <property name="remove-path" value="${node-pat...@uname='${uname}']"
/>
        <echo message="Removing ${remove-path} node." />
        <property name="project-name" value="AlertsProject1" />
        <xmltask source="${workspace}/${project-name}/src/nav_menu.xml"
            dest="${workspace}/${project-name}/src/nav_menu.xml">
            <remove path="${remove-path}" />
        </xmltask>
    </target>

I try to make the next:
-For every node that have @label in attributes go to _remove-label-nodes
target, sending the node
-The _remove-label-nodes target search nodes that have @uname, and call the
_remove-uname-node target
-The _remove-uname-node target try to remove the node passed by params

The trouble is that the target _remove-label-nodes, lost the changes made by
_remove-uname-node, because I think that I can't make nestes xmltask.
I try to use <call buffer="">, but the buffer retains the removed node, not
the result of remove action
What do you think, how is the best way to make this?
Regards
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users

Reply via email to