Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

InsertClause

Insert a node sequence at update position.


Syntax

InsertClause

graphics/InsertClause.png

Expr Expr

Top of page

Description

An InsertClause is part of an UpdateExpr and contains two expressions: the first one evaluates to a node sequence to be inserted. The second one determines the update node at which the insert operation should take place. The effective result of the insert operation is one or more documents that contain the additional node sequence inserted at the respective update nodes. Depending on whether to include element or attribute nodes there are up to three ways of inserting a node sequence:

following

At the update nodes insert the node sequence as following sibling in the document. This applies to inserting element nodes only.

preceding

At the update nodes insert the node sequence as preceding sibling in the document. This applies to inserting element nodes only.

into

At the update nodes insert the node sequence as child nodes in the document if element nodes are inserted. If the update node has not yet a child element node, the nodes then constitute the list of new element child nodes. If the update node already has child element nodes, they are inserted at the end of the current children nodes.

A sequence of attribute nodes is inserted as new attributes of the elements that are represented by the update nodes.

Top of page

Examples

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:

Top of page