Storing Query Results


The XUF specification defines the fn:put() function as

fn:put($node as node(), $uri as xs:string) as empty-sequence() 

where:

The fn:put() function is similar to the ddtek:serialize-to-url() function, but it is executed at the end of the XQuery execution, when all pending updates have been applied – but before control is returned to the calling application. See ddtek:serialize-to-url for more information on that function.

Example

The following code shows an example of the fn:put() function being used in an updating XQuery:

declare variable $holding := doc('holdings.xml'); 
delete nodes $holding/table/holdings[UserId = "Minollo"], 
put($holding, "newHolding.xml")