SourceForge.net Logo
Public Attributes | List of all members
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>

Public Attributes

XQC_Error(* create_child_context )(XQC_StaticContext *context, XQC_StaticContext **child_context)
 Creates a child context of the given static context. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
XQC_Error(* get_default_function_ns )(XQC_StaticContext *context, const char **uri)
 Returnsthe default namespace for functions set in this static context. More...
 
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. More...
 
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. More...
 
XQC_Error(* set_construction_mode )(XQC_StaticContext *context, XQC_ConstructionMode mode)
 Sets the construction mode to either XQC_PRESERVE_CONS or XQC_StaticContext. More...
 
XQC_Error(* get_construction_mode )(XQC_StaticContext *context, XQC_ConstructionMode *mode)
 Returns the construction mode that is set in the given static context. More...
 
XQC_Error(* set_ordering_mode )(XQC_StaticContext *context, XQC_OrderingMode mode)
 Sets the ordering mode to either XQC_ORDERED or XQC_UNORDERED. More...
 
XQC_Error(* get_ordering_mode )(XQC_StaticContext *context, XQC_OrderingMode *mode)
 Returns the ordering mode that is set in the given static context. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
XQC_Error(* set_base_uri )(XQC_StaticContext *context, const char *base_uri)
 Sets the base uri in the given static context. More...
 
XQC_Error(* get_base_uri )(XQC_StaticContext *context, const char **base_uri)
 Returns the base uri that is set in the given static context. More...
 
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. More...
 
void(* free )(XQC_StaticContext *context)
 Called to free the resources associated with the XQC_StaticContext. More...
 

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

XQC_Error(* XQC_StaticContext_s::create_child_context)(XQC_StaticContext *context, XQC_StaticContext **child_context)

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
contextThe XQC_StaticContext that this function pointer is a member of
[out]child_contextThe 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
contextThe XQC_StaticContext that this function pointer is a member of
prefixThe prefix of the namespace to add to the given XQC_StaticContext.
uriThe uri of the namespace to add to the given XQC_StaticContext.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
void(* XQC_StaticContext_s::free)(XQC_StaticContext *context)

Called to free the resources associated with the XQC_StaticContext.

Parameters
contextThe 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
contextThe XQC_StaticContext that this function pointer is a member of
[out]base_uriThe base uri that is set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::get_boundary_space_policy)(XQC_StaticContext *context, XQC_BoundarySpaceMode *mode)

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

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
[out]modeThe XQC_BoundarySpaceMode that is set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::get_construction_mode)(XQC_StaticContext *context, XQC_ConstructionMode *mode)

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

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
[out]modeThe XQC_ConstructionMode that is set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::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.

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
[out]preserveThe XQC_PreserveMode that is set in the given context.
[out]inheritThe XQC_InheritMode that is set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::get_default_element_and_type_ns)(XQC_StaticContext *context, const char **uri)
Parameters
contextThe XQC_StaticContext that this function pointer is a member of
[out]uriThe uri of the default element and type namespace that is set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::get_default_function_ns)(XQC_StaticContext *context, const char **uri)

Returnsthe default namespace for functions set in this static context.

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
[out]uriThe uri of the default function namespace that is set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::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.

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

Called to retrieve an implementation specific interface.

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
nameThe 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
contextThe XQC_StaticContext that this function pointer is a member of
prefixThe prefix of the namespace to add to the given XQC_StaticContext.
[out]result_nsThe 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
XQC_Error(* XQC_StaticContext_s::get_ordering_mode)(XQC_StaticContext *context, XQC_OrderingMode *mode)

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

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
[out]modeThe XQC_OrderingMode that is set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::get_xpath_compatib_mode)(XQC_StaticContext *context, XQC_XPath1Mode *mode)

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

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
[out]modeThe XQC_XPath1Mode that is set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::set_base_uri)(XQC_StaticContext *context, const char *base_uri)

Sets the base uri in the given static context.

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
base_uriThe base uri to set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::set_boundary_space_policy)(XQC_StaticContext *context, XQC_BoundarySpaceMode mode)

Sets the boundary space policy to either XQC_PRESERVE_SPACE or XQC_STRIP_SPACE.

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
modeThe XQC_BoundarySpaceMode to set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::set_construction_mode)(XQC_StaticContext *context, XQC_ConstructionMode mode)

Sets the construction mode to either XQC_PRESERVE_CONS or XQC_StaticContext.

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
modeThe XQC_ConstructionMode to set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::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.

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
preserveThe XQC_PreserveMode to set in the given context.
inheritThe XQC_InheritMode to set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::set_default_element_and_type_ns)(XQC_StaticContext *context, const char *uri)

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

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
uriThe uri of the default element and type namespace to set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::set_default_function_ns)(XQC_StaticContext *context, const char *uri)

Sets the default namespace for functions.

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
uriThe uri of the default function namespace to set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::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.

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
modeThe XQC_OrderEmptyMode to set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::set_error_handler)(XQC_StaticContext *context, XQC_ErrorHandler *handler)
XQC_Error(* XQC_StaticContext_s::set_ordering_mode)(XQC_StaticContext *context, XQC_OrderingMode mode)

Sets the ordering mode to either XQC_ORDERED or XQC_UNORDERED.

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
modeThe XQC_OrderingMode to set in the given context.
Return values
XQC_NO_ERROR
XQC_INTERNAL_ERROR
XQC_Error(* XQC_StaticContext_s::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.

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
modeThe 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: