Thanks!


On Thu, Dec 12, 2013 at 1:20 PM, Christian Grün <christian.gruen@gmail.com> wrote:
> Is there a way to get a local copy of the database node so that we do not
> reference the node in the database for further usage in the xquery (any
> other cleaner way instead of iterating over the data and creating a local
> copy that foo:get-node-v2 is doing)?

You could try the XQuery Update transform expression [1]:

  copy $a := <your-result/> modify () return $a

[1] http://docs.basex.org/wiki/XQuery_Update#transform