[EMAIL PROTECTED] wrote:

Hi,

I'm currently writing a template for replacing a node in an XML file. I want
to write the last time the user logged in in a file with the following
structure:

<users>
 <user>
   <name>login-name</name>
   <lastlogintime>time</lastlogintime>
 </user>
</users>

I use the following source-write structure:

       <source:insert overwrite="true">
           <source:source>${filepath}/lastlogin.xml</source:source>
           <source:path>//users/</source:path>
           <source:replace>user[name==${name}]</source:replace>
           <source:fragment>
               <user>
                   <name>${name}</name>
                   <lastlogintime>${logintime}</lastlogintime>
               </user>
           </source:fragment>
       </source:insert>

It should add the structure if it doesn't exist, and replace if it is
already there. However, the current code always inserts the structure,
rather than replaces an existing one.

Can someone tell me what's wrong?


My question is more "why are you doing this with the SWT?" Really, this is a controller matter, and the SWT was there for the times before we had proper controller options (i.e. flow). Really, pipelines should be side-effect free, and SWT is
inherently not!


Regards, Upayavira


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to