SourceForge.net Logo

XQC_StaticContext_s Struct Reference

The XQC_StaticContext struct provides a way to specify values for the static context of the query to be prepared. More...

#include <xqc.h>

List of all members.

Public Attributes

XQC_Error(* create_child_context )(XQC_StaticContext *context, XQC_StaticContext **child_context)
 Creates a child context of the given static context.
XQC_Error(* declare_ns )(XQC_StaticContext *context, const char *prefix, const char *uri)
 Adds a (prefix, uri) pair to the set of statically known namespaces of the given context.
XQC_Error(* get_ns_by_prefix )(XQC_StaticContext *context, const char *prefix, const char **result_ns)
 Returns the namespace uri that belongs to the given prefix.
XQC_Error(* set_default_element_and_type_ns )(XQC_StaticContext *context, const char *uri)
 Sets the value of the default namespace for elements and types.
XQC_Error(* get_default_element_and_type_ns )(XQC_StaticContext *context, const char **uri)
XQC_Error(* set_default_function_ns )(XQC_StaticContext *context, const char *uri)
 Sets the default namespace for functions.
XQC_Error(* get_default_function_ns )(XQC_StaticContext *context, const char **uri)
 Returnsthe default namespace for functions set in this static context.
XQC_Error(* set_xpath_compatib_mode )(XQC_StaticContext *context, XQC_XPath1Mode mode)
 Sets the XPath 1.0 compatibility mode to either XQC_XPATH1_0 or XQC_XPATH2_0.
XQC_Error(* get_xpath_compatib_mode )(XQC_StaticContext *context, XQC_XPath1Mode *mode)
 Returns the XPath 1.0 compatibility that is set in the given static context.
XQC_Error(* set_construction_mode )(XQC_StaticContext *context, XQC_ConstructionMode mode)
 Sets the construction mode to either XQC_PRESERVE_CONS or XQC_StaticContext.
XQC_Error(* get_construction_mode )(XQC_StaticContext *context, XQC_ConstructionMode *mode)
 Returns the construction mode that is set in the given static context.
XQC_Error(* set_ordering_mode )(XQC_StaticContext *context, XQC_OrderingMode mode)
 Sets the ordering mode to either XQC_ORDERED or XQC_UNORDERED.
XQC_Error(* get_ordering_mode )(XQC_StaticContext *context, XQC_OrderingMode *mode)
 Returns the ordering mode that is set in the given static context.
XQC_Error(* set_default_order_empty_sequences )(XQC_StaticContext *context, XQC_OrderEmptyMode mode)
 Sets the default order mode for empty sequences to either XQC_EMTPY_LEAST or XQC_EMPTY_GREATEST.
XQC_Error(* get_default_order_empty_sequences )(XQC_StaticContext *context, XQC_OrderEmptyMode *mode)
 Returns the default order mode for empty sequences that is set in the given static context.
XQC_Error(* set_boundary_space_policy )(XQC_StaticContext *context, XQC_BoundarySpaceMode mode)
 Sets the boundary space policy to either XQC_PRESERVE_SPACE or XQC_STRIP_SPACE.
XQC_Error(* get_boundary_space_policy )(XQC_StaticContext *context, XQC_BoundarySpaceMode *mode)
 Returns the boundary space policy that is set in the given static context.
XQC_Error(* set_copy_ns_mode )(XQC_StaticContext *context, XQC_PreserveMode preserve, XQC_InheritMode inherit)
 Sets the copy namespace mode which consists of the preserve and the inherit mode.
XQC_Error(* get_copy_ns_mode )(XQC_StaticContext *context, XQC_PreserveMode *preserve, XQC_InheritMode *inherit)
 Returns the copy namespace mode as a pair consisting of the preserve and the inherit mode.
XQC_Error(* set_base_uri )(XQC_StaticContext *context, const char *base_uri)
 Sets the base uri in the given static context.
XQC_Error(* get_base_uri )(XQC_StaticContext *context, const char **base_uri)
 Returns the base uri that is set in the given static context.
XQC_Error(* set_error_handler )(XQC_StaticContext *context, XQC_ErrorHandler *handler)
XQC_Error(* get_error_handler )(const XQC_StaticContext *context, XQC_ErrorHandler **handler)
void *(* get_interface )(const XQC_StaticContext *context, const char *name)
 Called to retrieve an implementation specific interface.
void(* free )(XQC_StaticContext *context)
 Called to free the resources associated with the XQC_StaticContext.

Detailed Description

The XQC_StaticContext struct provides a way to specify values for the static context of the query to be prepared.

An XQC_StaticContext object is not thread-safe - threads should each use their own instance of a XQC_StaticContext object.

XQC_StaticContext objects are created by calling the XQC_Implementation::create_context() function. Once created, the user is responsible for freeing the object by calling the free() function. The XQC_StaticContext object should be freed before the XQC_Implementation object that created it.


Member Data Documentation

Creates a child context of the given static context.

A child context contains the same information as it's parent context but it allows the user to override and add information. The user is responsible for freeing the XQC_StaticContext object returned by calling XQC_StaticContext::free().

Parameters:
context The XQC_StaticContext that this function pointer is a member of
[out] child_context The newly created XQC_StaticContext object which is a child of the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 
XQC_Error(* XQC_StaticContext_s::declare_ns)(XQC_StaticContext *context, const char *prefix, const char *uri)

Adds a (prefix, uri) pair to the set of statically known namespaces of the given context.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
prefix The prefix of the namespace to add to the given XQC_StaticContext.
uri The uri of the namespace to add to the given XQC_StaticContext.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Called to free the resources associated with the XQC_StaticContext.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
XQC_Error(* XQC_StaticContext_s::get_base_uri)(XQC_StaticContext *context, const char **base_uri)

Returns the base uri that is set in the given static context.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
[out] base_uri The base uri that is set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Returns the boundary space policy that is set in the given static context.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
[out] mode The XQC_BoundarySpaceMode that is set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Returns the construction mode that is set in the given static context.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
[out] mode The XQC_ConstructionMode that is set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Returns the copy namespace mode as a pair consisting of the preserve and the inherit mode.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
[out] preserve The XQC_PreserveMode that is set in the given context.
[out] inherit The XQC_InheritMode that is set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 
Parameters:
context The XQC_StaticContext that this function pointer is a member of
[out] uri The uri of the default element and type namespace that is set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Returnsthe default namespace for functions set in this static context.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
[out] uri The uri of the default function namespace that is set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Returns the default order mode for empty sequences that is set in the given static context.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
[out] mode The XQC_OrderEmptyMode that is set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 
void*(* XQC_StaticContext_s::get_interface)(const XQC_StaticContext *context, const char *name)

Called to retrieve an implementation specific interface.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
name The name that identifies the interface to return
Returns:
A pointer to the interface, or 0 if the name is not recognized by this implementation of XQC.
XQC_Error(* XQC_StaticContext_s::get_ns_by_prefix)(XQC_StaticContext *context, const char *prefix, const char **result_ns)

Returns the namespace uri that belongs to the given prefix.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
prefix The prefix of the namespace to add to the given XQC_StaticContext.
[out] result_ns The namespace uri of the namespace registered with the given prefix, or 0 if none can be found.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Returns the ordering mode that is set in the given static context.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
[out] mode The XQC_OrderingMode that is set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Returns the XPath 1.0 compatibility that is set in the given static context.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
[out] mode The XQC_XPath1Mode that is set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Sets the base uri in the given static context.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
base_uri The base uri to set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Sets the boundary space policy to either XQC_PRESERVE_SPACE or XQC_STRIP_SPACE.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
mode The XQC_BoundarySpaceMode to set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Sets the construction mode to either XQC_PRESERVE_CONS or XQC_StaticContext.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
mode The XQC_ConstructionMode to set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Sets the copy namespace mode which consists of the preserve and the inherit mode.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
preserve The XQC_PreserveMode to set in the given context.
inherit The XQC_InheritMode to set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Sets the value of the default namespace for elements and types.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
uri The uri of the default element and type namespace to set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Sets the default namespace for functions.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
uri The uri of the default function namespace to set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Sets the default order mode for empty sequences to either XQC_EMTPY_LEAST or XQC_EMPTY_GREATEST.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
mode The XQC_OrderEmptyMode to set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Sets the ordering mode to either XQC_ORDERED or XQC_UNORDERED.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
mode The XQC_OrderingMode to set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

Sets the XPath 1.0 compatibility mode to either XQC_XPATH1_0 or XQC_XPATH2_0.

Parameters:
context The XQC_StaticContext that this function pointer is a member of
mode The XQC_XPath1Mode to set in the given context.
Return values:
XQC_NO_ERROR 
XQC_INTERNAL_ERROR 

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

Generated on Mon Mar 1 21:16:37 2010 for XQilla XQC API by  doxygen 1.6.1