Re: [Xmltask-users] Does the replace task have access to the current node information?
Brought to you by:
bagnew
From: Brian A. <br...@oo...> - 2005-03-18 00:47:36
|
I don't think you can do the below as you suggest, but you should be able to do: <copy path="/parent/child/@attrA" property="A"/> <copy path="/parent/child/@attrB" property="B"/> <attr path="/parent/child" attr="attrB" value="${A}.$B}"/> or similar. I haven't tried this, so let me know if you have no joy.... The tasks have no 'relative' concept. Currently all Xpath expressions *have* to be complete and relative to the root node. Brian Scott Symmank wrote: >does the replace task have access to the current node information? > ><replace path="parent/child[@attrB]" withText="current()/@attrA . >current()/@attrB" /> > >i am trying to do the below transform, and remembered that i >had used xmltask, a couple of years ago, with good success. > >if i use XSLT, it *seems* like i have to reconstruct everything, >making the changes as i go. >the schema is more complicated than the below example. > > > >INPUT: ><parent> > <child attrA="a" attrB="b" /> > <child attrA="a1" attrB="b2" /> ></parent> > >OUTPUT: ><parent> > <child attrA="a" attrB="a.b" /> > <child attrA="a1" attrB="a1.b2" /> ></parent> > >i am glad this list started. thanks, > >scott > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >_______________________________________________ >Xmltask-users mailing list >Xml...@li... >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 |