Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

fn:put

Inserts a new instance into a database.


Syntax

fn:put(node $node, string $uri)

Top of page

Description

The function does not return a result.

Updating functions, which include fn:put, cannot be called from an XQuery expression. This function can only be called within an XQuery update expression.

If the $node argument holds an XML document node, a corresponding document is stored in the Tamino database. If the $node argument holds an element, it is internally wrapped by a document node.

The fn:put function is restricted to store documents in the database instance that is processing the update expression. Because of this constraint, the argument must be a relative URI. The relative URI is interpreted in the same way as the corresponding part in the URI of a _process command; this means that:

The doctype part of the URI must be indicated by a slash. The docname part of the URI, if present, must be indicated by a slash. The following example URI stores into ino:etc with a docname of "test": ino:etc//test.

Top of page

Parameters

$node

A node that holds the instance to be inserted.

$uri

The URI of the location where the instance should be stored.

Top of page

Examples

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:

Top of page