XQC_DynamicContext_s Struct Reference

An object of the type XQC_DynamicContext contains the information that is available at the time the query is executed. More...

#include <zorba/zorbac.h>


Data Fields

void * data
 for internal use only
void(* free )(XQC_DynamicContext context)
 Called to free the resources associated with the XQC_DynamicContext.
XQUERY_ERROR(* set_context_document )(XQC_DynamicContext context, const char *doc_uri, FILE *document)
 Sets the context item to the document given by the FILE pointer.
XQUERY_ERROR(* set_context_item )(XQC_DynamicContext context, XQC_Item value)
 Sets the context item to the given XQC_Item.
XQUERY_ERROR(* set_default_collection )(XQC_DynamicContext context, XQC_Item collection_uri)
 Defines the value of the default collection that is used when calling the fn:collection function without a parameter.
XQUERY_ERROR(* set_implicit_timezone )(XQC_DynamicContext context, int timezone)
 Sets the implicit timezone parameter.
XQUERY_ERROR(* set_variable_document )(XQC_DynamicContext context, const char *var_qname, const char *doc_uri, FILE *document)
 Sets the external variable to the document given by the FILE pointer.
XQUERY_ERROR(* set_variable_item )(XQC_DynamicContext context, const char *qname, XQC_Item value)
 Sets the external variable to the value given.
XQUERY_ERROR(* set_variable_sequence )(XQC_DynamicContext context, const char *qname, XQC_Sequence value)
 Sets the external variable to the sequence given.


Detailed Description

An object of the type XQC_DynamicContext contains the information that is available at the time the query is executed.

It contains the information that is defined in the XQuery specification (see http://www.w3.org/TR/xquery/#eval_context). An instance of this struct can be retrieved by calling the get_dynamic_context function of an XQC_Query object.

Examples:

ccontext.c, and cdatamanager.c.

Definition at line 793 of file zorbac.h.


Field Documentation

void* XQC_DynamicContext_s::data

for internal use only

Definition at line 900 of file zorbac.h.

void(* XQC_DynamicContext_s::free)(XQC_DynamicContext context)

Called to free the resources associated with the XQC_DynamicContext.

Parameters:
context The XQC_DynamicContext that this function pointer is a member of
Examples:
ccontext.c, and cdatamanager.c.

XQUERY_ERROR(* XQC_DynamicContext_s::set_context_document)(XQC_DynamicContext context, const char *doc_uri, FILE *document)

Sets the context item to the document given by the FILE pointer.

The provided document is accessible by the provided doc_uri.

Parameters:
context The XQC_DynamicContext that this function pointer is a member of
doc_uri The URI referencing the given document
document The document to which the context item should be set as a FILE pointer.
Return values:
XQC_NO_ERROR 
XQP0016_LOADER_IO_ERROR,\retval XQP0017_LOADER_PARSING_ERROR,
XQC_INTERNAL_ERROR 

XQUERY_ERROR(* XQC_DynamicContext_s::set_context_item)(XQC_DynamicContext context, XQC_Item value)

Sets the context item to the given XQC_Item.

Parameters:
context The XQC_DynamicContext that this function pointer is a member of
value The XQC_Item for the context item.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 
Examples:
ccontext.c.

XQUERY_ERROR(* XQC_DynamicContext_s::set_default_collection)(XQC_DynamicContext context, XQC_Item collection_uri)

Defines the value of the default collection that is used when calling the fn:collection function without a parameter.

Parameters:
context The XQC_DynamicContext that this function pointer is a member of
collection_uri the URI of the collection used by the fn:collection function.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 
Examples:
cdatamanager.c.

XQUERY_ERROR(* XQC_DynamicContext_s::set_implicit_timezone)(XQC_DynamicContext context, int timezone)

Sets the implicit timezone parameter.

Parameters:
context The XQC_DynamicContext that this function pointer is a member of
timezone The implicit timezone to set
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

XQUERY_ERROR(* XQC_DynamicContext_s::set_variable_document)(XQC_DynamicContext context, const char *var_qname, const char *doc_uri, FILE *document)

Sets the external variable to the document given by the FILE pointer.

Parameters:
context The XQC_DynamicContext that this function pointer is a member of
var_qname The qname of the external variable to set
doc_uri The URI referencing the given document
document The document to which the context item should be set as a FILE pointer.
Return values:
XQC_NO_ERROR 
XQP0016_LOADER_IO_ERROR,\retval XQP0017_LOADER_PARSING_ERROR,
XQC_INTERNAL_ERROR 

XQUERY_ERROR(* XQC_DynamicContext_s::set_variable_item)(XQC_DynamicContext context, const char *qname, XQC_Item value)

Sets the external variable to the value given.

Parameters:
context The XQC_DynamicContext that this function pointer is a member of
qname The qname of the external variable to set
value The XQC_Item value for the variable.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

XQUERY_ERROR(* XQC_DynamicContext_s::set_variable_sequence)(XQC_DynamicContext context, const char *qname, XQC_Sequence value)

Sets the external variable to the sequence given.

Parameters:
context The XQC_DynamicContext that this function pointer is a member of
qname The qname of the external variable to set
value The XQC_Sequence value for the variable.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 
Examples:
ccontext.c.


The documentation for this struct was generated from the following file: