There's an issue logged that indicates that buffers *aren't* stored
across <antcall> calls. I suspect that's what's happening below.
http://sourceforge.net/tracker/index.php?func=detail&aid=1609305&group_id=27398&atid=390335
(so the documentation is somewhat misleading at the moment).
I need to get time to look at a proposed fix (see enclosed mail) but
that won't happen for a few days yet. An alternative is to get XMLTask
to store buffers on the file system, but I'm not sure I like that idea.
Brian
[EMAIL PROTECTED] wrote:
Hi,
I have installed the latest version of xmltask, and I got a problem of
compatibility with my existing script : the result of an xpath expression stored
in a buffer is lost in another target !
Note: Your tutorial said :
" Buffers exist for the duration of the Ant process and consequently can be used
across multiple invocations of <xmltask>"
.../...
"so the buffer storedXml is maintained across multiple targets."
Configuration :
- JVM : 1.5.0 rel 7
- Ant : 1.6.5
- OS : Windows XP
Example of ant script :
<target name="pre.eval"
description="evaluation: extraction des parametres">
<xmltask source="${build_chaine}/${ficonfig_chaine}">
<print path="/chaine/[EMAIL PROTECTED]'${pevalcible}']"
comment="debog
source"/>
<copy path="/chaine/[EMAIL PROTECTED]'${pevalcible}']"
buffer="x_eval"/>
</xmltask>
<xmltask sourcebuffer="x_eval">
<print path="." comment="all x_eval, same target"/>
</xmltask>
<antcall target="do_eval"/>
</target>
<target name="do_eval"
description="evaluation: execution de la chaine, etape par etape">
<xmltask sourcebuffer="x_eval">
<print path="." comment="all x_eval"/>
</xmltask>
</target>
Result of print :
pre.eval:
[xmltask] { node output - debog source
[xmltask] <eval id="dat_1" note="">
[xmltask] <application path="profil/DAT"
task="base_profil">defaut</application>
[xmltask] </eval>
[xmltask] } node output
[xmltask] { node output - all x_eval, same target
[xmltask] <eval id="dat_1" note="">
[xmltask] <application path="profil/DAT"
task="base_profil">defaut</application>
[xmltask] </eval>
[xmltask] } node output
do_eval:
[xmltask] { node output - all x_eval
[xmltask] } node output
Where is the problem ? How can I store an XML fragment to use in another target
?
Thank you in advance for any ideas.
--
Adrien KMIECIK
CNAMTS Ingénierie des Systèmes d'Echanges
35 rue Mazelle 57000 METZ FRANCE
Tel : +33 (0) 387 211 620
Fax : +33 (0) 387 211 601
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users
--
Brian Agnew http://www.oopsconsultancy.com
OOPS Consultancy Ltd brian @ oopsconsultancy.com
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users