yumapro  23.10T-7
YumaPro SDK
Loading...
Searching...
No Matches
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...
 
val_value_txpath1_get2_find_return_key (xpath_get2_cb_t *cb, obj_template_t *keyobj)
 Find a return key. More...
 
getcb_get2_txpath1_get2_ancestor_keys_setup (xpath_get2_cb_t *cb)
 Create parent_get2cb to facilitate all ancestor keys to the next callback invocation. More...
 

Detailed Description

GET2 API callback support for XPath 1.0 Processing.

Function Documentation

◆ xpath1_get2_ancestor_keys_setup()

getcb_get2_t * xpath1_get2_ancestor_keys_setup ( xpath_get2_cb_t cb)

Create parent_get2cb to facilitate all ancestor keys to the next callback invocation.

FOR XGET and WHEN/MUST statement eveluation handling. Otherwise the callbacks will be invoked with no any predecessors keys.

Parameters
cbcontrol block to check
Returns
malloced parent get2cb Control Block
Here is the call graph for this function:

◆ xpath1_get2_create_fake_nodes()

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
[out]retcbaddress of return cb within resnode for parent_get2cb
  • *retcb return cb within resnode for parent_get2cb
Returns
status
Here is the call graph for this function:

◆ xpath1_get2_expand_result()

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
[in,out]resultXPath result nodeset to alter
  • result->nodeQ contents adjusted or replaced
leaflist_onlytrue to only check leaflists
Returns
status
Here is the call graph for this function:

◆ xpath1_get2_find_return_key()

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:

◆ xpath1_get2_free_cb()

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:

◆ xpath1_get2_free_fake_nodes()

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:

◆ xpath1_get2_free_node()

void xpath1_get2_free_node ( xpath_get2_node_t node)

Free a malloced XPath GET2 node.

Parameters
nodepointer to get2 node to free

◆ xpath1_get2_get_resnode_parent()

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
[out]parentvaladdress of return parentval
  • *parentval return parentval (parent_cb will be NULL)
[out]parent_cbaddress of return parent_cb
  • *parent_cb return parent_cb (parentval will be NULL)
Here is the caller graph for this function:

◆ xpath1_get2_new_cb()

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:

◆ xpath1_get2_new_node()

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

◆ xpath1_get2_set_nodeset_child()

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
[in,out]resultaddress of return XPath result nodeset
  • result->nodeQ contents adjusted or replaced
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
Returns
status
Here is the call graph for this function:

◆ xpath1_get2_set_resnode_parent()

status_t xpath1_get2_set_resnode_parent ( xpath_resnode_t resnode)

Set the resnode to its parent.

Parameters
resnodexpath result path node to convert