Hi, Thx for the info below.

Can you do something like (and I haven't tested this!)

copy from /transformation/step/description/text() into buffer
paste into /transformation/step/file/name/text()

?

I guess the problem is that the above paths match *multiple* elements. In
which case you could make use of the <call> subtask and do something like:

<call path="/transformation/step">
  <param name="desc1" value="description/text()">
  <param name="desc2" value="file/name/text()">
  <action>
    <paste path="file/name/text()" value="@{desc1} @{desc2}"/>
  </action>
</call>

(not tested!)

or something similar (the <call> task calls the enclosed <action> for each
occurrence of the nominated path). That would be more what you want, I
think... Let me know how you get on.

Brian


On Fri, August 18, 2006 16:34, Paulus Philippe wrote:
> Thanks for your time ...
>
> Informations about the environement
> - java      : 1.4.2_05
> - ant       : 1.6.5
> - xmltask   : 1.11.3
>
> My environement seems working properly.
> For example:
> <replace
> path="/transformation/step[starts-with(name,'EQT')]/file/name/text()"
> withText="D:/" /> is working.
>
> But:
> <copy path="ancestor::file/preceding-sibling::description/text()"
> buffer="NAMEFILE" /> is not working.
>
>
> I want to put the <description> text of each <step> in its <file><name>
> element. Do you understand what I want to do?
>
>
>
> -----Message d'origine-----
> De : Brian Agnew [mailto:[EMAIL PROTECTED]
> Envoyé : vendredi 18 août 2006 16:12
> À : Paulus Philippe
> Cc : xmltask-users@lists.sourceforge.net
> Objet : Re: [Xmltask-users] Is XPATH preceding-sibling working
>
>
> Paulus,
>
> In your example, I'm not sure what you're trying to do. The ancestor::file
> will match to everything above <file>, i.e. <transformation> and <step>.
> Then preceding-sibling will give you the element prior to that. So I think
> you'd only match the first <step>.
>
> It's quite possible I'm mis-interpreting this, but couldn't you use:
>
> /transformation/step[1]
>
> ?
>
> Brian
>
> On Fri, August 18, 2006 14:01, Paulus Philippe wrote:
>> Hi,
>> I want to use the XPATH preceding-sibling but I seems not working...
>> I have the beginFile.xml, I use the antFile.xml and I want to generate a
>> file like wantedFile.xml.
>> Any suggestions ?
>>  <<antFile.xml>>  <<beginFile.xml>>  <<wantedFile.xml>>
>>
>> Philippe Paulus  - Architecte
>> Sopra Group
>> Tél. :+33 (0)2 23 25 25 52 - [EMAIL PROTECTED]
>>
>> Ce message est exclusivement destiné aux personnes dont le nom figure
>> ci-dessus. Il peut contenir des informations confidentielles dont la
>> divulgation est à ce titre rigoureusement interdite. Dans l'hypothèse où
>> vous avez reçu ce message par erreur, merci de le renvoyer à l'adresse
>> e-mail ci-dessus et de détruire toute copie.
>>
>> This message may contain confidential and proprietary material for the
>> sole use of the intended recipient. Any review or distribution by others
>> is strictly prohibited. If you are not the intended recipient, please
>> contact the sender and delete all copies.
>>
>>
>> -------------------------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services,
>> security?
>> Get stuff done quickly with pre-integrated technology to make your job
>> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642_______________________________________________
>> 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
> Tel: +44 (0)7720 397526
> Fax: +44 (0)20 8682 0012
>
>


-- 
Brian Agnew                  http://www.oopsconsultancy.com
OOPS Consultancy Ltd
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users

Reply via email to