Data Fields
Zorba_StaticContext_s Struct Reference

#include <zorba/zorbac.h>

Data Fields

XQC_Error(* add_collation )(Zorba_StaticContext *context, const char *uri)
 Add a collation URI. More...
 
XQC_Error(* get_default_collation )(Zorba_StaticContext *context, const char **uri)
 Get the URI of the default collation. More...
 
XQC_Error(* get_xquery_version )(Zorba_StaticContext *context, XQC_XQueryVersion *ver)
 Returns the XQuery processor's version that is set in the given static context. More...
 
XQC_Error(* register_external_function )(Zorba_StaticContext *context, const char *uri, const char *localname, external_function_init init_fn, external_function_next next_fn, external_function_free free_fn, void *global_user_data)
 Register an external function that can be called within a query. More...
 
XQC_Error(* set_default_collation )(Zorba_StaticContext *context, const char *uri)
 Set the URI of the default collation. More...
 
XQC_Error(* set_xquery_version )(Zorba_StaticContext *context, XQC_XQueryVersion ver)
 Sets the XQuery processor's version to either xquery_version_1_0 or xquery_version_3_0. More...
 

Detailed Description

Definition at line 66 of file zorbac.h.

Field Documentation

XQC_Error(* Zorba_StaticContext_s::add_collation)(Zorba_StaticContext *context, const char *uri)

Add a collation URI.

The URI specifies the locale and collation strength of the collation that is added. A valid collation URI must begin with http://www.flworfound.org/collations/. This prefix is followed by a collation strength (i.e. PRIMARY, SECONDARY, TERTIARY, QUATTERNARY, or IDENTICAL) followed by a '/'. After the strength a lower-case two- or three-letter ISO-639 language code must follow. The URI may end with an upper-case two-letter ISO-3166. For example, http://www.flworfound.org/collations/PRIMARY/en/US specifies an english language with US begin the country..

Internally, ICU is used for comparing strings. For detailed description see http://www.icu-project.org/apiref/icu4c/classCollator.html and http://www.icu-project.org/apiref/icu4c/classLocale.html

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
uriThe URI of the collation to add.
Return values
XQC_Error::XQC_NO_ERROR
err::XQST0038
XQC_Error::XQC_INTERNAL_ERROR

Definition at line 91 of file zorbac.h.

XQC_Error(* Zorba_StaticContext_s::get_default_collation)(Zorba_StaticContext *context, const char **uri)

Get the URI of the default collation.

The uri returned is valid as long as the corresponding XQC_StaticContext object is valid.

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
[out]uriThe URI of the default collation that is currently set in the given context.

Definition at line 115 of file zorbac.h.

XQC_Error(* Zorba_StaticContext_s::get_xquery_version)(Zorba_StaticContext *context, XQC_XQueryVersion *ver)

Returns the XQuery processor's version that is set in the given static context.

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
[out]modeThe xquery_version_t that is set in the given context.
Return values
XQC_Error::XQC_NO_ERROR
XQC_Error::XQC_INTERNAL_ERROR

Definition at line 140 of file zorbac.h.

XQC_Error(* Zorba_StaticContext_s::register_external_function)(Zorba_StaticContext *context, const char *uri, const char *localname, external_function_init init_fn, external_function_next next_fn, external_function_free free_fn, void *global_user_data)

Register an external function that can be called within a query.

One external function consists of three function parameters, i.e. init, next, and release.

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
uriThe URI of the external function to add.
localnameThe localname of the function to add.
initA callback function pointer that is called once when the external function is initialized. The init function gets the global_user_data pointer as parameter.
releaseA callback function pointer that is called once when the external function is deinitialized.
global_user_dataUser specific data that is passed to the init function as a parameter.
Return values
XQC_Error::XQC_NO_ERROR
XQC_INVALID_ARGUMENT,\retvalXQC_Error::XQC_INTERNAL_ERROR

Definition at line 161 of file zorbac.h.

XQC_Error(* Zorba_StaticContext_s::set_default_collation)(Zorba_StaticContext *context, const char *uri)

Set the URI of the default collation.

(see http://www.w3.org/TR/xquery/#static_context)

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
uriThe URI of the default collation to set
Return values
XQC_Error::XQC_NO_ERROR
err::XQST0038
XQC_Error::XQC_INTERNAL_ERROR

Definition at line 105 of file zorbac.h.

XQC_Error(* Zorba_StaticContext_s::set_xquery_version)(Zorba_StaticContext *context, XQC_XQueryVersion ver)

Sets the XQuery processor's version to either xquery_version_1_0 or xquery_version_3_0.

Parameters
contextThe XQC_StaticContext that this function pointer is a member of
modeThe xquery_version_t to set in the given context.
Return values
XQC_Error::XQC_NO_ERROR
XQC_Error::XQC_INTERNAL_ERROR

Definition at line 128 of file zorbac.h.


The documentation for this struct was generated from the following file:
blog comments powered by Disqus