yumapro  20.10-10
YumaPro SDK
XPath1 Server GET2 Support

GET2 API callback support for XPath 1.0 Processing. More...

Collaboration diagram for XPath1 Server GET2 Support:

Data Structures

struct  xpath1_walker_cookie_t
 walker cookie contains the state used to output or process XPath nodes that are received from GET2 callbacks More...
 

Functions

status_t xpath1_get2_set_nodeset_child (xpath_pcb_t *pcb, xpath_result_t *result, xmlns_id_t childnsid, const xmlChar *childname, boolean textmode, ncx_xpath_axis_t axis)
 Check the current result nodeset and replace each node with a node for every child instead. More...
 
status_t xpath1_get2_set_resnode_parent (xpath_resnode_t *resnode)
 Set the resnode to its parent. More...
 
void xpath1_get2_get_resnode_parent (xpath_get2_node_t *get2node, val_value_t **parentval, xpath_get2_cb_t **parent_cb)
 Get the resnode parent. More...
 
status_t xpath1_get2_expand_result (xpath_pcb_t *pcb, xpath_result_t *result, boolean leaflist_only)
 Check the result for GET2 nodes that need to be retrieved. More...
 
xpath_get2_cb_txpath1_get2_new_cb (obj_template_t *obj, val_value_t *parent_val, xpath_get2_cb_t *parent_cb)
 Create a malloced XPath parser control block. More...
 
void xpath1_get2_free_cb (xpath_get2_cb_t *cb)
 Free a malloced XPath parser control block. More...
 
xpath_get2_node_txpath1_get2_new_node (xpath_get2_cb_t *cb, val_value_t *val, xpath_get2_form_t get2_form)
 Create a malloced XPath GET2 node. More...
 
void xpath1_get2_free_node (xpath_get2_node_t *node)
 Free a malloced XPath GET2 node. More...
 
status_t xpath1_get2_create_fake_nodes (getcb_get2_t *parent_get2cb, dlq_hdr_t *resnodeQ, xpath_get2_cb_t **retcb)
 @brief Create a dummy resnode chain for XPath processing of a GET2 node as the context node More...
 
void xpath1_get2_free_fake_nodes (dlq_hdr_t *resnodeQ)
 Free the queue of dummy resnodes chain for XPath processing of a GET2 node as the context node. More...
 
status_t xpath1_get2_simulate_callback (xpath_pcb_t *pcb, xpath_get2_cb_t *cb, xpath1_walker_cookie_t *cookie)
 Setup GET2 control block based on val value from the AIO control block, use valQ to contruct termQ and keyQ. More...
 
val_value_txpath1_get2_find_return_key (xpath_get2_cb_t *cb, obj_template_t *keyobj)
 Find a return key. More...
 

Detailed Description

GET2 API callback support for XPath 1.0 Processing.

Function Documentation

status_t xpath1_get2_create_fake_nodes ( getcb_get2_t parent_get2cb,
dlq_hdr_t *  resnodeQ,
xpath_get2_cb_t **  retcb 
)

@brief Create a dummy resnode chain for XPath processing of a GET2 node as the context node

Parameters
parent_get2cbstarting cb to use for resnode chain
resnodeQ== Q to store xpath_resnode_t structs
retcbaddress of return cb within resnode for parent_get2cb
Return values
*retcbreturn cb within resnode for parent_get2cb
Returns
status

Here is the call graph for this function:

status_t xpath1_get2_expand_result ( xpath_pcb_t pcb,
xpath_result_t result,
boolean  leaflist_only 
)

Check the result for GET2 nodes that need to be retrieved.

Parameters
pcbparser control block in progress
resultXPath result nodeset to alter
leaflist_onlytrue to only check leaflists
Return values
result->nodeQcontents adjusted or replaced
Returns
status

Here is the call graph for this function:

val_value_t* xpath1_get2_find_return_key ( xpath_get2_cb_t cb,
obj_template_t keyobj 
)

Find a return key.

Parameters
cbcontrol block to check
keyobjkey to find
Returns
pointer to key value if found; NULL otherwise

Here is the call graph for this function:

Here is the caller graph for this function:

void xpath1_get2_free_cb ( xpath_get2_cb_t cb)

Free a malloced XPath parser control block.

Parameters
cbpointer to get2 control block to free

Here is the call graph for this function:

Here is the caller graph for this function:

void xpath1_get2_free_fake_nodes ( dlq_hdr_t *  resnodeQ)

Free the queue of dummy resnodes chain for XPath processing of a GET2 node as the context node.

MUST ONLY BE USED TO FREE STRUCTS FROM xpath1_get2_create_fake_nodes

Parameters
resnodeQQ of xpath_resnode_t structs to free

Here is the call graph for this function:

void xpath1_get2_free_node ( xpath_get2_node_t node)

Free a malloced XPath GET2 node.

Parameters
nodepointer to get2 node to free

Here is the caller graph for this function:

void xpath1_get2_get_resnode_parent ( xpath_get2_node_t get2node,
val_value_t **  parentval,
xpath_get2_cb_t **  parent_cb 
)

Get the resnode parent.

Parameters
get2nodeGET2 resnode to check
parentvaladdress of return parentval
parent_cbaddress of return parent_cb
Return values
*parentvalreturn parentval (parent_cb will be NULL)
*parent_cbreturn parent_cb (parentval will be NULL)

Here is the caller graph for this function:

xpath_get2_cb_t* xpath1_get2_new_cb ( obj_template_t obj,
val_value_t parent_val,
xpath_get2_cb_t parent_cb 
)

Create a malloced XPath parser control block.

One or the other parameter is usually set, not bith

Parameters
objobject that the GET2 callback is for
parent_valparent node parent for obj
parent_cbparent GET2 CB for obj
Returns
malloced control block or NULL if error

Here is the call graph for this function:

Here is the caller graph for this function:

xpath_get2_node_t* xpath1_get2_new_node ( xpath_get2_cb_t cb,
val_value_t val,
xpath_get2_form_t  get2_form 
)

Create a malloced XPath GET2 node.

Used only for context node creation

Parameters
cbParser control block to use for context when creating new node
valvalue node to use for node creation
get2_formindicates source of the val node
Returns
malloced control block or NULL if error

Here is the caller graph for this function:

status_t xpath1_get2_set_nodeset_child ( xpath_pcb_t pcb,
xpath_result_t result,
xmlns_id_t  childnsid,
const xmlChar *  childname,
boolean  textmode,
ncx_xpath_axis_t  axis 
)

Check the current result nodeset and replace each node with a node for every child instead.

Check for GET2 callbacks for datanodes

Handles child and descendant nodes

If a child is specified then any node not containing this child will be removed

Error messages are printed by this function!! Do not duplicate error messages upon error return

Parameters
pcbparser control block in progress
resultaddress of return XPath result nodeset
childnsid0 if any namespace is OK else only this namespace will be checked
childnamename of child to find
== NULL to find all child nodes In this mode, if the context object is config=true, then config=false children will be skipped
textmodeTRUE if just selecting text() nodes
FALSE if ignored
axisactual axis used
          XP_AX_DESCENDANT
          XP_AX_DESCENDANT_OR_SELF
          XP_AX_CHILD
Return values
result->nodeQcontents adjusted or replaced
Returns
status

Here is the call graph for this function:

status_t xpath1_get2_set_resnode_parent ( xpath_resnode_t resnode)

Set the resnode to its parent.

Parameters
resnodexpath result path node to convert
status_t xpath1_get2_simulate_callback ( xpath_pcb_t pcb,
xpath_get2_cb_t cb,
xpath1_walker_cookie_t cookie 
)

Setup GET2 control block based on val value from the AIO control block, use valQ to contruct termQ and keyQ.

Parameters
pcbparser control block in progress
cbcXPath GET2 control block for child_obj
cookiethe opaque parameter block to pass to the walkerfn
Returns
status

Here is the call graph for this function: