I'm trying to understand how to use db:output() in the context of a REST function that does a bunch of stuff that updates and then wants to return a result. I have my updating functions using db:output() to return XML elements that are log entries, which I have up to now then formatted as HTML for return by the Web app. However, there doesn't appear to be a way to get the stuff returned by db:output before it gets returned to the ultimate caller. Have I missed something? My REST-handling function is declared as %updating: declare %updating %rest:path("/repo/{$repo}/{$branch}/updateLinkManagementIndexes") Which I understand to be a requirement if the function itself calls any updating functions. I tried e.g.: let $result := f:myUpdatingFunction() return db:output(f:formatLogItems($result)) But that results in the "no updating functions" message on the variable assignment. Is there a way to do what I want? Thanks, Eliot ---- Eliot Kimber, Owner Contrext, LLC http://contrext.com