> The XQuery Processor
#include <zorba/zorbac.h>
Data Fields | |
| XQUERY_ERROR(* | boolean_value )(XQC_Item item, int *bool_value) |
| Get the bool value of the boolean Item. | |
| void * | data |
| for internal use only | |
| void(* | free )(XQC_Item item) |
| Called to free the resources associated with the XQC_Item. | |
| XQUERY_ERROR(* | localname )(XQC_Item item, const char **local_name) |
| Get the value of a QName's localname. | |
| XQUERY_ERROR(* | nan )(XQC_Item item, int *is_nan) |
| Check if the value of the Item is not a number (NaN). | |
| XQUERY_ERROR(* | ns )(XQC_Item item, const char **ns) |
| Get the (optional) value of a QName's namespace. | |
| XQUERY_ERROR(* | pos_or_neg_inf )(XQC_Item item, int *inf) |
| Check if the value of the Item is positive or negative infinity. | |
| XQUERY_ERROR(* | prefix )(XQC_Item item, const char **prefix) |
| Get the (optional) value of a QName's prefix. | |
| XQUERY_ERROR(* | string_value )(XQC_Item item, const char **string_value) |
| The string value is the string that is extracted by calling the fn:string function on the Item (see http://www.w3.org/TR/xpath-functions/#func-string). | |
Instances of the XDM are a sequence, i.e. an ordered collection of zero or more items. In the Zorba API, a sequence is represented by the XQC_Sequence struct.
The Item class is the union of all XQuery node and atomic types. The class provides functions to access the information of an Item. Note that not all functions are defined on every Item kind. If a function is called on an Item that does not provide the function called, an XQP0024_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE error is raised.
A new atomic Item can be created using the ItemFactory. A new node Item should be created by the result of a query.
ccontext.c, cdatamanager.c, cerror.c, cexternal_functions.c, and csimple.c.
Definition at line 919 of file zorbac.h.
| XQUERY_ERROR(* XQC_Item_s::boolean_value)(XQC_Item item, int *bool_value) |
Get the bool value of the boolean Item.
Note that this function is only available for Items of type boolean.
| item | The XQC_Item that this function pointer is a member of | |
| [out] | bool_value | 1 if the boolean value of the given item is true, 0 otherwise. |
| XQC_NO_ERROR | ||
| XQP0019_INTERNAL_ERROR | ||
| XQP0024_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE |
| void* XQC_Item_s::data |
| void(* XQC_Item_s::free)(XQC_Item item) |
Called to free the resources associated with the XQC_Item.
| item | The XQC_Item that this function pointer is a member of |
| XQUERY_ERROR(* XQC_Item_s::localname)(XQC_Item item, const char **local_name) |
Get the value of a QName's localname.
Note that this function is only available for Items of type QName.
| item | The XQC_Item that this function pointer is a member of | |
| [out] | localname | The localname of the given QName item. This string is valid as long as the given item is valid. |
| XQC_NO_ERROR | ||
| XQP0019_INTERNAL_ERROR | ||
| XQP0024_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE |
| XQUERY_ERROR(* XQC_Item_s::nan)(XQC_Item item, int *is_nan) |
Check if the value of the Item is not a number (NaN).
Note that this function is implemented for all item types but may only return 1 for a numeric item (e.g. Double or Float).
| item | The XQC_Item that this function pointer is a member of | |
| [out] | is_nan | 1 if the given item is not a number, 0 otherwise. |
| XQC_NO_ERROR | ||
| XQP0019_INTERNAL_ERROR | ||
| XQP0024_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE |
| XQUERY_ERROR(* XQC_Item_s::ns)(XQC_Item item, const char **ns) |
Get the (optional) value of a QName's namespace.
Note that this function is only available for Items of type QName.
| item | The XQC_Item that this function pointer is a member of | |
| [out] | namespace | The namespace of the given QName item. This string is valid as long as the given item is valid. |
| XQC_NO_ERROR | ||
| XQP0019_INTERNAL_ERROR | ||
| XQP0024_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE |
| XQUERY_ERROR(* XQC_Item_s::pos_or_neg_inf)(XQC_Item item, int *inf) |
Check if the value of the Item is positive or negative infinity.
Note that this function is only available for numeric items (e.g. Double or Float).
| item | The XQC_Item that this function pointer is a member of | |
| [out] | inf | 1 if the given item is +/-INF, 0 otherwise. |
| XQC_NO_ERROR | ||
| XQP0019_INTERNAL_ERROR | ||
| XQP0024_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE |
| XQUERY_ERROR(* XQC_Item_s::prefix)(XQC_Item item, const char **prefix) |
Get the (optional) value of a QName's prefix.
Note that this function is only available for Items of type QName.
| item | The XQC_Item that this function pointer is a member of | |
| [out] | prefix | The prefix of the given QName item. This string is valid as long as the given item is valid. |
| XQC_NO_ERROR | ||
| XQP0019_INTERNAL_ERROR | ||
| XQP0024_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE |
| XQUERY_ERROR(* XQC_Item_s::string_value)(XQC_Item item, const char **string_value) |
The string value is the string that is extracted by calling the fn:string function on the Item (see http://www.w3.org/TR/xpath-functions/#func-string).
Note that this function is available for all types of Items.
| item | The XQC_Item that this function pointer is a member of | |
| [out] | string_value | The string-value of the given item. This string is valid as long as the given item is valid. |
| XQC_NO_ERROR | ||
| XQP0019_INTERNAL_ERROR | ||
| XQP0024_FUNCTION_NOT_IMPLEMENTED_FOR_ITEMTYPE |