fn:put

Writes a document to disk. Often (but not necessarily) the document will be the result of applying updates to a source document. It can, however, be a completely new document constructed by the query, or a document copied from a different location.

put($doc as node(), $uri as xs:string) ➔ xs:NCName?

Arguments

 

$doc

node()

The document to be written to disk

 

$uri

xs:string

The location where the document is to be written, as a file:/// URI

Result

xs:NCName?

Namespace

http://www.w3.org/2005/xpath-functions

Links to W3C specifications

XQuery Update 1.0

Notes on the Saxon implementation

Implemented in Saxon; available only when XQuery Updates is enabled.

From Saxon 9.9, the serialization of the supplied document is performed according to the serialization properties defined in the query prolog (for example declare option output:indent "yes"), which default to the properties defined in the Configuration. Serialization properties specified on the XQuery command line have no effect.