- From: Carmelo Montanez <carmelo@nist.gov>
- Date: Fri, 27 Jul 2007 11:41:37 -0400
- To: "Wu, Emma" <Emma.Wu@ddytech.com>, <www-ql@w3.org>
Received on Friday, 27 July 2007 15:44:31 UTC
Emma: If I am not mistaken, you can use a Transform expression, which will return a value back. Something like this: let $var := fn:doc("works-mod.xml")/works[1]/employee[1] let $var1 := <pnum>P1-1</pnum> return transform copy $newVar := $var modify do replace $newVar/pnum[1] with $var1 return $newVar Thanks, Carmelo At 02:02 PM 7/26/2007, Wu, Emma wrote: >Hi, > >The problem I am trying to solve is that with XQuery Update >faicility, I will update an element and at the same time, I want the >same element to be returned. Something like the following: > >1. update a book element's author >2. return the updated book element > >Is there a way to do it in one query instead of two separate >queries? And it looks like update expression does not return anything > >Thanks, >Emma > > > >
Received on Friday, 27 July 2007 15:44:31 UTC