Namespace nodes
Namenspace nodes represent the namespaces known in the respective context. The textual value of a namespace node is the related URI. The typed value results from the textual…
Node properties
As already described, a XML document in the XQuery data model is depicted as a tree of nodes. Each node has its own identity (not to be confused with…
Functions on nodes
The name of a node can be accessed with the XQuery functions fn:node-name() and fn:name(). If the node has no name (document nodes, comment nodes or…
Overview of node functions
The following table provides an overview of the so-called node functions. Some of the node functions can be called up without any argument. In this case, the function…
Sequence types and node access functions
In XQuery there are some constructs where it is necessary to indicate each expected type. For example, for a function definition the types of the…
Node types
Any node is represented by node(). In addition, it is possible to demand a certain node type, as for example a text node or an element node. The type can be defined even more…
Node access functions
One part of the sequence type syntax can also be used in path expressions in order to filter out some nodes from the sequence of the nodes which have been addressed by a…
Type expressions
XQuery introduces some expressions for dealing with types being unknown in this form in other languages. The type conversion for atomic types (cast as)…
Type assignment
Document nodes and element nodes can be explicitly validated against schema definitions with the validate instruction.
ValidateExpr ::= validate SchemaMode? SchemaContext? {…
Type query
For the query of the type of a sequence value, XQuery provides the two expressions instance of and typeswitch. The excerpt from the grammar is as follows:
InstanceofExpr ::=…