SourceForge.net Logo
Public Attributes | List of all members
XQC_Sequence_s Struct Reference

#include <xqc.h>

Public Attributes

XQC_Error(* next )(XQC_Sequence *sequence)
 Moves the XQC_Sequence so that the current item is positioned at the next item in the sequence. More...
 
void *(* get_interface )(const XQC_Sequence *sequence, const char *name)
 Called to retrieve an implementation specific interface. More...
 
void(* free )(XQC_Sequence *sequence)
 Called to free the resources associated with the XQC_Sequence. More...
 
Functions on the current item
XQC_Error(* item_type )(const XQC_Sequence *sequence, XQC_ItemType *type)
 Returns an item type enumeration for the type of the current item. More...
 
XQC_Error(* type_name )(const XQC_Sequence *sequence, const char **uri, const char **name)
 Returns the type name for the current item as a (URI, localname) pair. More...
 
XQC_Error(* string_value )(const XQC_Sequence *sequence, const char **value)
 Returns the string value of the current item in the sequence - this is equivalent to calling fn:string() (http://www.w3.org/TR/xpath-functions/#func-string) on the current item. More...
 
XQC_Error(* integer_value )(const XQC_Sequence *sequence, int *value)
 Returns the value of the current item in the sequence as an integer - this is equivalent to calling fn:number() (http://www.w3.org/TR/xpath-functions/#func-number) on the current item, and casting the result to an int. More...
 
XQC_Error(* double_value )(const XQC_Sequence *sequence, double *value)
 Returns the value of the current item in the sequence as a double - this is equivalent to calling fn:number() (http://www.w3.org/TR/xpath-functions/#func-number) on the current item. More...
 
XQC_Error(* node_name )(const XQC_Sequence *sequence, const char **uri, const char **name)
 Returns the name for the current node as a (URI, localname) pair. More...
 

Detailed Description

Examples:
xqc-basic.c, and xqc-context-item.c.

Member Data Documentation

XQC_Error(* XQC_Sequence_s::double_value)(const XQC_Sequence *sequence, double *value)

Returns the value of the current item in the sequence as a double - this is equivalent to calling fn:number() (http://www.w3.org/TR/xpath-functions/#func-number) on the current item.

This is available for all item types.

Parameters
sequenceThe XQC_Sequence that this function pointer is a member of
[out]valueThe value of the current item as a double.
Return values
XQC_NO_ERROR
XQC_NO_CURRENT_ITEMif there is no current item, either because next() has not been called yet, or because the end of the sequence has been reached.
void(* XQC_Sequence_s::free)(XQC_Sequence *sequence)

Called to free the resources associated with the XQC_Sequence.

Parameters
sequenceThe XQC_Sequence that this function pointer is a member of
Examples:
xqc-basic.c, and xqc-context-item.c.
void*(* XQC_Sequence_s::get_interface)(const XQC_Sequence *sequence, const char *name)

Called to retrieve an implementation specific interface.

Parameters
sequenceThe XQC_Sequence 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_Sequence_s::integer_value)(const XQC_Sequence *sequence, int *value)

Returns the value of the current item in the sequence as an integer - this is equivalent to calling fn:number() (http://www.w3.org/TR/xpath-functions/#func-number) on the current item, and casting the result to an int.

This is available for all item types.

Parameters
sequenceThe XQC_Sequence that this function pointer is a member of
[out]valueThe value of the current item as an int.
Return values
XQC_NO_ERROR
XQC_NO_CURRENT_ITEMif there is no current item, either because next() has not been called yet, or because the end of the sequence has been reached.
XQC_Error(* XQC_Sequence_s::item_type)(const XQC_Sequence *sequence, XQC_ItemType *type)

Returns an item type enumeration for the type of the current item.

Parameters
sequenceThe XQC_Sequence that this function pointer is a member of
[out]typethe XQC_ItemType of the current item
Return values
XQC_NO_ERROR
XQC_NO_CURRENT_ITEMif there is no current item, either because next() has not been called yet, or because the end of the sequence has been reached.
XQC_Error(* XQC_Sequence_s::next)(XQC_Sequence *sequence)

Moves the XQC_Sequence so that the current item is positioned at the next item in the sequence.

Parameters
sequenceThe XQC_Sequence that this function pointer is a member of
Return values
XQC_NO_ERRORwhen the call is successful
XQC_END_OF_SEQUENCEwhen the end of the sequence is reached
XQC_TYPE_ERROR
XQC_DYNAMIC_ERROR
Examples:
xqc-basic.c, and xqc-context-item.c.
XQC_Error(* XQC_Sequence_s::node_name)(const XQC_Sequence *sequence, const char **uri, const char **name)

Returns the name for the current node as a (URI, localname) pair.

Parameters
sequenceThe XQC_Sequence that this function pointer is a member of
[out]uriThe URI of the name of the current node. The memory for the string will be valid until a subsequent call to XQC_Sequence::next().
[out]nameThe localname of the name of the current node. The memory for the string will be valid until a subsequent call to XQC_Sequence::next().
Return values
XQC_NO_ERROR
XQC_NO_CURRENT_ITEMif there is no current item, either because next() has not been called yet, or because the end of the sequence has been reached.
XQC_NOT_NODEif the current item is not a node.
XQC_Error(* XQC_Sequence_s::string_value)(const XQC_Sequence *sequence, const char **value)

Returns the string value of the current item in the sequence - this is equivalent to calling fn:string() (http://www.w3.org/TR/xpath-functions/#func-string) on the current item.

This is available for all item types.

Parameters
sequenceThe XQC_Sequence that this function pointer is a member of
[out]valueThe string value of the current item. The memory for the string will be valid until a subsequent call to XQC_Sequence::next().
Return values
XQC_NO_ERROR
XQC_NO_CURRENT_ITEMif there is no current item, either because next() has not been called yet, or because the end of the sequence has been reached.
Examples:
xqc-basic.c, and xqc-context-item.c.
XQC_Error(* XQC_Sequence_s::type_name)(const XQC_Sequence *sequence, const char **uri, const char **name)

Returns the type name for the current item as a (URI, localname) pair.

Parameters
sequenceThe XQC_Sequence that this function pointer is a member of
[out]uriThe URI of the type of the current item. The memory for the string will be valid until a subsequent call to XQC_Sequence::next().
[out]nameThe localname of the type of the current item. The memory for the string will be valid until a subsequent call to XQC_Sequence::next().
Return values
XQC_NO_ERROR
XQC_NO_CURRENT_ITEMif there is no current item, either because next() has not been called yet, or because the end of the sequence has been reached.

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