The Context class encapsulates the context within which a query is performed against an Container. The context includes namespace mappings, variable bindings, and flags that indicate how the query result set should be determined and returned to the caller. Multiple queries can be executed within the same Context;
Context allows you to define whether queries executed within the context are to be evaluated lazily or eagerly, and whether the query is to return live or dead values.
The Query syntax permits expressions to refer to namespace prefixes, but not to define them. The Context class provides namespace management methods so that the caller may manage the namespace prefix to URI mapping. By default the prefix "dbxml" is defined to be "http://www.sleepycat.com/2002/dbxml".
The Query syntax also permits expressions to refer to externally defined variables. The XmlQueryContext class provides methods that allow the caller to manage the externally-declared variable to value bindings.
self[variable]
self[variable] = value
clear_namespaces
del_namespace(name)
evaltype
evaltype = type
get_namespace(name)
returntype
returntype = type
set_namespace(name, uri)
Define a namespace prefix, providing the URI that it maps onto
If uri is nil delete the namespace
uri
uri = val