RenameClause

Rename the nodes of a node sequence.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:


Syntax

RenameClause

graphics/RenameClause.png

Expr QName

Description

A RenameClause is part of an UpdateExpr and renames the nodes of the node sequence that is the result of the evaluation of the expression with the supplied QName. A rename operation can be applied to element, attribute and processing instruction nodes.

Example

  • Rename the attribute year as jahr:

    update rename input()/bib/book/@year as jahr

    This rename operation will fail for the provided sample data and schema definitions, since an attribute jahr is not included in the schema. See Performing Update Operations in the XQuery4 User Guide for more information.