Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

ComputedElementConstructor

Construct an element by computing an expression.


Syntax

ComputedElementConstructor

graphics/ComputedElementConstructor.png

QName Expr ExprSequence

Top of page

Description

A ComputedElementConstructor constructs an element by computing the enclosed ExprSequence, called content expression. The name of the element is either a QName or it is computed from an expression (name expression).

The value resulting from evaluating the name expression undergoes atomization, and must be a single atomic value of the type xs:QName, xs:string, or xdt:untypedAtomic, otherwise a type error is raised. If it is of type xs:QName, its expanded QName is used as element name and the prefix part of the QName is retained. Otherwise, the value is converted to an expanded QName. If a namespace prefix is present, it is resolved using the statically known namespaces, otherwise it is local in the default namespace.

The content expression is evaluated in the same way as an enclosed expression in an ElementConstructor.

Top of page

Examples

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:

This construct is also related to the following construct(s):

ElementConstructor

Top of page