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=3D"/transformation/step">
<param name=3D"desc1" value=3D"description/text()">
<param name=3D"desc2" value=3D"file/name/text()">
<action>
<paste path=3D"file/name/text()" value=3D"@{desc1} @{desc2}"/>
</action>
</call>
(not tested!)
or something similar (the <call> task calls the enclosed <action> for eac=
h
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=3D"/transformation/step[starts-with(name,'EQT')]/file/name/text()"
> withText=3D"D:/" /> is working.
>
> But:
> <copy path=3D"ancestor::file/preceding-sibling::description/text()"
> buffer=3D"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:brian@...]
> Envoy=E9 : vendredi 18 ao=FBt 2006 16:12
> =C0 : Paulus Philippe
> Cc : xmltask-users@...
> 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::f=
ile
> will match to everything above <file>, i.e. <transformation> and <step>.
> Then preceding-sibling will give you the element prior to that. So I th=
ink
> 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=E9l. :+33 (0)2 23 25 25 52 - ppaulus@...
>>
>> Ce message est exclusivement destin=E9 aux personnes dont le nom figur=
e
>> ci-dessus. Il peut contenir des informations confidentielles dont la
>> divulgation est =E0 ce titre rigoureusement interdite. Dans l'hypoth=E8=
se o=F9
>> vous avez re=E7u ce message par erreur, merci de le renvoyer =E0 l'adr=
esse
>> e-mail ci-dessus et de d=E9truire toute copie.
>>
>> This message may contain confidential and proprietary material for the
>> sole use of the intended recipient. Any review or distribution by othe=
rs
>> 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=3Dlnk&kid=3D120709&bid=3D263057&da=
t=3D121642_______________________________________________
>> Xmltask-users mailing list
>> Xmltask-users@...
>> 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
>
>
--=20
Brian Agnew http://www.oopsconsultancy.com
OOPS Consultancy Ltd
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012
|