ItemType

Specify the type of an item.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:


Syntax

ItemType

graphics/ItemType.png

QName KindTest ElementTest ElementTest AttributeTest

Description

An ItemType specifies the type of an XQuery item by using one of:

  • a qualified name that is interpreted as an atomic type,

  • a KindTest matching processing instruction nodes, comment nodes, text nodes or any kind of nodes,

  • any single item.

Examples

  • The item type xs:decimal is a QName matching the value 47.11 since it is of the atomic type xs:decimal.

  • document-node(element(book)) matches a document node containing exactly one element node that is matched by the ElementTest element(book).

  • item() matches for example the atomic value 42 or the element <bib>.