C Context Components

The tables in this section describe how values are assigned to the various components of the static context and dynamic context, and to the parameters that control the serialization process.

C.1 Static Context Components

The following table describes the components of the static context. The following aspects of each component are described:

Static Context Components
Component Default initial value Can be overwritten or augmented by implementation? Can be overwritten or augmented by prolog? Can be overwritten or augmented by expressions? Consistency rules
Statically known namespaces fn, xml, xs, xsi, local overwriteable and augmentable (except for xml) overwriteable and augmentable by 5.13 Namespace Declaration overwriteable and augmentable by element constructor Only one namespace can be assigned to a given prefix per lexical scope.
Default element/type namespace no namespace overwriteable overwriteable by 5.14 Default Namespace Declaration overwriteable by element constructor Only one default namespace per lexical scope.
In-scope variables none augmentable overwriteable and augmentable by 5.16 Variable Declaration and 4.4.2.4 Inline Function Expressions, augmentable by 5.12 Module Import overwriteable and augmentable by variable-binding expressions Only one definition per variable per lexical scope.
Context item static type item() overwriteable overwriteable by 5.17 Context Item Declaration overwriteable by expresssions that set the context item None.
Ordering mode ordered overwriteable overwriteable by 5.7 Ordering Mode Declaration overwriteable by expression Value must be ordered or unordered.
Default function namespace fn overwriteable (not recommended) overwriteable by 5.14 Default Namespace Declaration no None.
In-scope schema types built-in types in xs augmentable augmentable by 5.11 Schema Import no Only one definition per global or local type.
In-scope element declarations none augmentable augmentable by 5.11 Schema Import no Only one definition per global or local element name.
In-scope attribute declarations none augmentable augmentable by 5.11 Schema Import no Only one definition per global or local attribute name.
Statically known function signatures the signatures of the built-in functions augmentable augmentable by 5.12 Module Import and by 5.18 Function Declaration; augmentable by 5.11 Schema Import (which adds constructor functions for user-defined types) no Each function must have a unique expanded QName and number of arguments.
Default collation Unicode codepoint collation overwriteable overwriteable by 5.4 Default Collation Declaration no None.
Construction mode preserve overwriteable overwriteable by 5.6 Construction Declaration no Value must be preserve or strip.
Default order for empty sequences implementation-defined overwriteable overwriteable by 5.8 Empty Order Declaration no Value must be greatest or least.
Boundary-space policy strip overwriteable overwriteable by 5.3 Boundary-space Declaration no Value must be preserve or strip.
Copy-namespaces mode inherit, preserve overwriteable overwriteable by 5.9 Copy-Namespaces Declaration no Value consists of inherit or no-inherit, and preserve or no-preserve.
Static Base URI See rules in 5.5 Base URI Declaration overwriteable overwriteable by 5.5 Base URI Declaration no Value must be a valid lexical representation of the type xs:anyURI.
Statically known decimal formats the default (unnamed) decimal format, which has an implementation-dependent value augmentable augmentable, using decimal format declarations no each QName uniquely identifies a decimal format
Statically known documents none augmentable no no None.
Statically known collections none augmentable no no None.
Statically known default collection type item()* overwriteable no no None.
Statically known collations only the default collation augmentable no no Each URI uniquely identifies a collation.
XPath 1.0 Compatibility Mode false no no no Must be false.
Serialization Parameters
allow-duplicate-names no overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
byte-order-mark implementation-defined overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
cdata-section-elements empty overwriteable and augmentable overwriteable by prolog no Section 3 Serialization Parameters SER31
doctype-public none overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
doctype-system none overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
encoding implementation-defined choice between "utf-8" and "utf-16" overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
escape-uri-attributes yes overwriteable and augmentable overwriteable by prolog no Section 3 Serialization Parameters SER31
html-version implementation-defined overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
include-content-type yes overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
indent no overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
item-separator implementation-defined overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
json-node-output-method xml overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
media-type implementation-defined overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
method xml overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
normalization-form implementation-defined overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
omit-xml-declaration implementation-defined overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
standalone implementation-defined overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
suppress-indentation empty overwriteable and augmentable overwriteable by prolog no Section 3 Serialization Parameters SER31
undeclare-prefixes no overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31
use-character-maps empty overwriteable and augmentable overwriteable by prolog no Section 3 Serialization Parameters SER31
version implementation-defined overwriteable overwriteable by prolog no Section 3 Serialization Parameters SER31

C.2 Dynamic Context Components

The following table describes the components of the dynamic context. The following aspects of each component are described:

Dynamic Context Components
Component Default initial value Can be overwritten or augmented by implementation? Can be overwritten or augmented by prolog? Can be overwritten or augmented by expressions? Consistency rules
Context item none overwriteable overwriteable by a 5.17 Context Item Declaration in the main module overwritten during evaluation of path expressions and predicates Must be the same in the dynamic context of every module in a query.
Context position none overwriteable overwriteable by a 5.17 Context Item Declaration in the main module overwritten during evaluation of path expressions and predicates If context item is defined, context position must be >0 and <= context size; else context position is absentDM31.
Context size none overwriteable overwriteable by a 5.17 Context Item Declaration in the main module overwritten during evaluation of path expressions and predicates If context item is defined, context size must be >0; else context size is absentDM31.
Variable values none augmentable overwriteable and augmentable by 5.16 Variable Declaration and 4.4.2.4 Inline Function Expressions, augmentable by 5.12 Module Import overwriteable and augmentable by variable-binding expressions Names and values must be consistent with in-scope variables.
Named functions the built-in functions augmentable augmentable by 5.18 Function Declaration, 5.12 Module Import, and 5.11 Schema Import ( (which adds constructor functions for user-defined types) no Must be consistent with statically known function signatures
Current dateTime none must be initialized by implementation no no Must include a timezone. Remains constant during evaluation of a query.
Implicit timezone none must be initialized by implementation no no Remains constant during evaluation of a query.
Available documents none must be initialized by implementation no no None
Available text resources none must be initialized by implementation no no None
Available collections none must be initialized by implementation no no None
Default collection none overwriteable no no None
Available URI collections none must be initialized by implementation no no None
Default URI collection none overwriteable no no None