CompCommentConstructor

Construct an XML comment by computing an expression.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:


Syntax

CompCommentConstructor

graphics/CompCommentConstructor.png

Expr

Description

A CompCommentConstructor constructs an XML comment by computing the enclosed Expr. That 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. It is an error if the result of the expression after atomization contains two adjacent hyphens or if it ends with a hyphen.

Example

  • This query constructs the XML comment <!--Houston, we have a problem.-->:

    let $homebase := "Houston"
    return comment { string-join(($homebase, ", we have a problem."), "") }