Prolog

Create environment for query processing.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:


Syntax

Prolog

graphics/Prolog.png

DefaultCollationDecl ModuleImport NamespaceDecl DefaultNamespaceDecl Pragma VarDecl FunctionDecl UpdatingFunctionDecl Pragma

Description

The Prolog prepares the environment in which the query processing takes place. The environment is defined for the module that contains the prolog, since the main module as well as any library module may contain their own prolog. A prolog is roughly organized into two parts. The first part contains module imports and several declarations that affect either query processing (DefaultCollationDeclaration) or the interpretation of QNames within the query (NamespaceDeclaration and DefaultNamespaceDeclaration). The second part consists of declarations of variables and functions. They appear at the end of the prolog because the imports and declarations in the first part may have impact on them.

Declarations and imports may all be followed by one or more pragmas each of which is followed by a semicolon and optional pragmas. These are directives for the query processor and control the way Tamino processes the query and outputs the query result.

Declarations, module imports and pragmas can only occur in the query prolog. It is an error to place them in the query body.