Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

CompPIConstructor

Construct a processing instruction by computing an expression.


Syntax

CompPIConstructor

graphics/CompPIConstructor.png

NCName Expr Expr

Top of page

Description

A CompPIConstructor constructs a processing instruction (PI) by computing the enclosed Expr, called content expression. The name of the element is either a NCName 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:NCName, xs:string, or xdt:untypedAtomic, otherwise a type error is raised. If necessary, the value is cast into type xs:NCName. It is then used as the PI target.

The content expression is evaluated and, after atomization, converted into a sequence of atomic values each of which is cast into a string and concatenated with a space character between each pair of values. If the result of the expression after atomization is an empty sequence, it is replaced by a string of length zero.

Top of page

Example

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:

Top of page