#18 property set by copy not usable in the same xmltask

closed
nobody
None
5
2010-06-18
2010-06-15
Anonymous
No

I use copy to calculate some value from XML file, store the value in a property and want to use it for next selection in next copy command.
However, it turns out, that the property set by copy is not visible until end of current xmltask.
To be able to use the created property, current xmltask must be ended and next one started like this:
<xmltask source="${xml.cfg}">
<copy
path="/AggregatedLocations/Locations/Region/Feed/AggregatedLocation[@id='${AggregatedLocationId}']/XQuery/text()"
property="XQuery"
/>
<copy
path="/AggregatedLocations/Locations/Region/Feed[AggregatedLocation/@id='${AggregatedLocationId}']/@feedRef"
property="feedRef"
/>
</xmltask>
<!-- As properties set inside xmltask are not expanded untill xmltask is finished, running 2nd time-->
<xmltask source="${xml.cfg}">
<copy
path="/AggregatedLocations/Enums/Feeds/Feed[@id='${feedRef}']/@preLocSetRef"
property="preLocSetRef"
/>
</xmltask>

Discussion

  • Brian Agnew

    Brian Agnew - 2010-06-18

    Unfortunately this is a function of Ant. Properties are resolved prior to each task invocation, so that property created by Ant can't be resolved until a new task is invoked. Use buffers instead for a more dynamic capability.

     
  • Brian Agnew

    Brian Agnew - 2010-06-18
    • status: open --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks