DB2 10.5 for Linux, UNIX, and Windows

Prolog

The prolog is series of declarations that define the processing environment for a query. Each declaration in the prolog is followed by a semicolon (;). The prolog is an optional part of the query; a valid query can consist of a query body with no prolog.

The prolog includes an optional version declaration, namespace declarations, and setters, which are optional declarations that set the values of properties that affect query processing.

DB2® XQuery supports the boundary-space declaration that can be used to change how the query is processed. The prolog also consists of namespace declarations and default namespace declarations.

DB2 XQuery also supports the following setters. However, they do not change the processing environment because DB2 XQuery supports only one option in each case:
  • Construction declaration
  • Copy-namespaces declaration
  • Empty order declaration
  • Ordering mode declaration

The version declaration, if present, must be first in the prolog. Setters and other declarations can appear in any order in the prolog after the version declaration.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-+-------------------------+---------------------------------->
   '-| Version declaration |-'   

   .--------------------------------------------------------.   
   V  (1)                                                   |   
>--------+------------------------------------------------+-+--><
         +-| Boundary-space declaration |-----------------+     
         +-| Construction declaration |-------------------+     
         +-| Copy-namespaces declaration |----------------+     
         +-| Empty order declaration |--------------------+     
         +-| Default element/type namespace declaration |-+     
         +-| Default function namespace declaration |-----+     
         +-| Namespace declaration |----------------------+     
         '-| Ordering mode declaration |------------------'     

Notes:
  1. Each declaration can be specified only once, except for the namespace declaration.