yumapro  23.10T-7
YumaPro SDK
Loading...
Searching...
No Matches
xpath1.h File Reference

XPath 1.0 expression support. More...

#include "dlq.h"
#include "getcb.h"
#include "ncxtypes.h"
#include "obj.h"
#include "status_enum.h"
#include "tk.h"
#include "val.h"
#include "xpath.h"
Include dependency graph for xpath1.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SET_SKIP_MODE(pcb)   (pcb)->flags |= XP_FL_SKIP_MODE
 Set the current skip mode active used only by internal xpath1_pred.c XPath requires that AND and OR expressions only be evaluated until the final value is known. More...
 
#define CLEAR_SKIP_MODE(pcb)   (pcb)->flags &= ~XP_FL_SKIP_MODE
 Clear the current skip mode.
 
#define IS_SKIP_MODE(pcb)   ((pcb)->flags & XP_FL_SKIP_MODE)
 Check if skip mode is active.
 

Functions

status_t xpath1_parse_expr (tk_chain_t *tkc, ncx_module_t *mod, xpath_pcb_t *pcb, xpath_source_t source)
 Parse the XPATH 1.0 expression string. More...
 
status_t xpath1_validate_expr (ncx_module_t *mod, obj_template_t *obj, xpath_pcb_t *pcb)
 Validate the previously parsed expression string. More...
 
status_t xpath1_validate_expr_ex (ncx_module_t *mod, obj_template_t *obj, xpath_pcb_t *pcb, boolean missing_is_error, boolean set_backptrs, ncx_xpath_type_t backptr_type)
 Validate the previously parsed expression string. More...
 
status_t xpath1_eval_obj_expr (xpath_pcb_t *pcb)
 Evaluate an OBJECT expression. More...
 
xpath_result_txpath1_eval_expr (xpath_pcb_t *pcb, val_value_t *val, val_value_t *docroot, boolean logerrors, boolean configonly, status_t *res)
 Evaluate an XPath expression use if the prefixes are YANG: must/when. More...
 
xpath_result_txpath1_eval_expr2 (xpath_pcb_t *pcb, val_value_t *val, val_value_t *docroot, boolean logerrors, boolean configonly, boolean force_only, status_t *res)
 Evaluate an XPath expression (alt) More...
 
xpath_result_txpath1_eval_expr3 (xpath_pcb_t *pcb, val_value_t *val, val_value_t *docroot, boolean logerrors, boolean configonly, boolean force_only, xml_msg_hdr_t *get2_mhdr, boolean get_when, xpath_get2_node_t *val_get2, status_t *res)
 Evaluate an XPath expression (alt3) More...
 
status_t xpath1_test_data_rule (xpath_pcb_t *pcb, getcb_get2_t *get2cb, boolean *testres)
 Test a NACM data rule expression against a GET2 control block. More...
 
xpath_result_txpath1_eval_xmlexpr (xmlTextReaderPtr reader, xpath_pcb_t *pcb, val_value_t *val, val_value_t *docroot, boolean logerrors, boolean configonly, status_t *res)
 Evaluate an XML document expression. More...
 
void xpath1_prune_nodeset (xpath_pcb_t *pcb, xpath_result_t *result)
 Check the current result nodeset and remove any redundant nodes from a NETCONF POV. More...
 
boolean xpath1_check_node_exists (xpath_pcb_t *pcb, dlq_hdr_t *resultQ, const val_value_t *val)
 Check if any ancestor-ot-self node is already in the specified Q. More...
 
boolean xpath1_check_node_exists_slow (xpath_pcb_t *pcb, dlq_hdr_t *resultQ, const val_value_t *val)
 Check if any ancestor-ot-self node is already in the specified Q Slow version. More...
 
boolean xpath1_check_resnode_exists (xpath_pcb_t *pcb, dlq_hdr_t *resultQ, xpath_resnode_t *resnode)
 Check if any ancestor-ot-self node is already in the specified Q. More...
 
status_t xpath1_stringify_nodeset (xpath_pcb_t *pcb, const xpath_result_t *result, xmlChar **str)
 Convert a value node pointer to a string node. More...
 
status_t xpath1_stringify_node (xpath_pcb_t *pcb, val_value_t *val, xmlChar **str)
 Convert a value node to a string node. More...
 
boolean xpath1_compare_result_to_string (xpath_pcb_t *pcb, xpath_result_t *result, xmlChar *strval, status_t *res)
 Compare an XPath result to the specified string. More...
 
boolean xpath1_compare_result_to_number (xpath_pcb_t *pcb, xpath_result_t *result, ncx_num_t *numval, status_t *res)
 Compare an XPath result to the specified number. More...
 
boolean xpath1_compare_nodeset_results (xpath_pcb_t *pcb, xpath_result_t *result1, xpath_result_t *result2, status_t *res)
 Compare an XPath result to another result. More...
 
boolean xpath1_find_val_in_nodeset (xpath_result_t *result, const xmlChar *valstr)
 Check a nodeset result and find the same value in one of the nodes. More...
 
boolean xpath1_find_val_in_nodeset_ex (xpath_result_t *result, val_value_t *testval)
 Check a nodeset result and find the same value in one of the nodes. More...
 
xpath_result_txpath1_parse_expr_int (xpath_pcb_t *pcb, status_t *res)
 Parse an XPath Expr sequence It has already been tokenized. More...
 
xpath_result_txpath1_parse_relational_expr_int (xpath_pcb_t *pcb, status_t *res)
 Parse an XPath Relational Expr sequence It has already been tokenized. More...
 
boolean xpath1_keep_object (obj_template_t *testobj, boolean textmode, xmlns_id_t nsid, const xmlChar *name)
 Test if an object should be kept in a resnode node-test. More...
 
void xpath1_dump_result (log_debug_t lvl, xpath_pcb_t *pcb, xpath_result_t *result, const char *banner)
 Generate log output displaying the contents of a result. More...
 
void xpath1_dump_resnode (log_debug_t lvl, xpath_resnode_t *resnode, const char *banner)
 Generate log output displaying the contents of an XPath resnode. More...
 

Detailed Description

XPath 1.0 expression support.