XPath execution class. More...
#include <xpath_processor.h>
XPath execution class.
anonymous enum |
xpath_processor::xpath_processor | ( | const TiXmlNode * | XNp_source_tree, | |
const char * | cp_xpath_expr | |||
) |
Constructor.
xpath_processor constructor
XNp_source_tree | Source XML tree | |
cp_xpath_expr | XPath expression |
References o_is_context_by_name, XEp_context, and XNp_base.
virtual TinyXPath::xpath_processor::~xpath_processor | ( | ) | [inline, virtual] |
expression_result xpath_processor::er_compute_xpath | ( | ) |
Compute an XPath expression.
The executions stack need to contain 1 and only 1 element, otherwize it's not valid
References e_error, er_result, v_build_root(), TinyXPath::xpath_stream::v_evaluate(), v_execute_stack(), v_remove_root(), XEp_root, and xs_stack.
Referenced by d_compute_xpath(), i_compute_xpath(), o_compute_xpath(), S_compute_xpath(), and u_compute_xpath_node_set().
TiXmlString xpath_processor::S_compute_xpath | ( | ) |
Compute an XPath expression and return the result as a string.
References er_compute_xpath(), and TIXML_STRING.
int xpath_processor::i_compute_xpath | ( | ) |
Compute an XPath expression and return the result as an integer.
References er_compute_xpath().
bool xpath_processor::o_compute_xpath | ( | ) |
double xpath_processor::d_compute_xpath | ( | ) |
unsigned xpath_processor::u_compute_xpath_node_set | ( | ) |
Compute an XPath expression, and return the number of nodes in the resulting node set.
Returns 0 if the result is not a node set
References TinyXPath::e_node_set, er_compute_xpath(), and er_result.
void xpath_processor::v_get_xpath_base | ( | unsigned | u_order, | |
const TiXmlBase *& | XBp_res, | |||
bool & | o_attrib | |||
) |
Get one of the XML nodes from the resulting node set. Can only be used after a call to u_compute_xpath_node_set.
u_order | Order of the node. Must be between 0 and the number of nodes - 1 | |
XBp_res | Output node | |
o_attrib | True if the output node is an attribute, false if it's a TiXmlNode |
References TinyXPath::e_node_set, and er_result.
Referenced by XAp_get_xpath_attribute(), and XNp_get_xpath_node().
TiXmlNode * xpath_processor::XNp_get_xpath_node | ( | unsigned | u_order | ) |
Retrieves an XPath node from the node set. This assumes you know it's not an attribute.
u_order | Order of the node. Must be between 0 and the number of nodes - 1 |
References v_get_xpath_base().
TiXmlAttribute * xpath_processor::XAp_get_xpath_attribute | ( | unsigned | u_order | ) |
Retrieves an XPath attribute from the node set. This assumes you know it's an attribute.
u_order | Order of the node. Must be between 0 and the number of nodes - 1 |
References v_get_xpath_base().
void xpath_processor::v_action | ( | xpath_construct | xc_rule, | |
unsigned | u_sub, | |||
unsigned | u_variable, | |||
const char * | cp_literal | |||
) | [protected, virtual] |
Callback from the XPath decoder : a rule has to be applied.
xc_rule | XPath Rule | |
u_sub | Rule sub number | |
u_variable | Parameter, depends on the rule | |
cp_literal | Input literal, depends on the rule |
Implements TinyXPath::xpath_stream.
References as_action_store.
int xpath_processor::i_get_action_counter | ( | ) | [protected, virtual] |
Internal use. Retrieves the current action counter.
Implements TinyXPath::xpath_stream.
References as_action_store.
void xpath_processor::v_execute_stack | ( | ) | [protected] |
Internal use. Executes the XPath expression. The executions starts at the end of the as_action_store list.
References as_action_store, v_execute_one(), and TinyXPath::xpath_expr.
Referenced by er_compute_xpath().
void xpath_processor::v_pop_one_action | ( | xpath_construct & | xc_action, | |
unsigned & | u_sub, | |||
unsigned & | u_ref, | |||
TiXmlString & | S_literal | |||
) | [protected] |
Retrieves one quadruplet from the action placeholder.
xc_action | Next rule on placeholder | |
u_sub | Sub rule | |
u_ref | Rule optional parameter | |
S_literal | Rule optional string |
References as_action_store.
Referenced by v_execute_one(), and v_execute_step().
void xpath_processor::v_execute_one | ( | xpath_construct | xc_rule, | |
bool | o_skip_only | |||
) | [protected] |
Executes one XPath rule.
Compute each argument, and store them in a temporary list
xc_rule | Rule number | |
o_skip_only | True if we only need to skip rules and not act on the data stack |
References TinyXPath::e_node_set, i_pop_int(), ns_pop_node_set(), S_pop_string(), TIXML_STRING, v_execute_absolute_path(), v_execute_function(), v_execute_step(), v_function_and(), v_function_equal(), v_function_minus(), v_function_mult(), v_function_not_equal(), v_function_opposite(), v_function_or(), v_function_plus(), v_function_relational(), v_function_union(), v_pop_one_action(), v_push_double(), v_push_int(), v_push_string(), TinyXPath::xpath_absolute_location_path, TinyXPath::xpath_absolute_location_path_abbrev, TinyXPath::xpath_absolute_location_path_slash, TinyXPath::xpath_absolute_location_path_slash_rel, TinyXPath::xpath_additive_expr, TinyXPath::xpath_additive_expr_minus, TinyXPath::xpath_additive_expr_more_minus, TinyXPath::xpath_additive_expr_more_plus, TinyXPath::xpath_additive_expr_plus, TinyXPath::xpath_additive_expr_simple, TinyXPath::xpath_and_expr, TinyXPath::xpath_and_expr_and, TinyXPath::xpath_and_expr_simple, TinyXPath::xpath_argument, TinyXPath::xpath_axis_name, TinyXPath::xpath_axis_specifier, TinyXPath::xpath_axis_specifier_at, TinyXPath::xpath_axis_specifier_axis_name, TinyXPath::xpath_axis_specifier_empty, TinyXPath::xpath_equality_expr, TinyXPath::xpath_equality_expr_equal, TinyXPath::xpath_equality_expr_not_equal, TinyXPath::xpath_equality_expr_simple, TinyXPath::xpath_expr, TinyXPath::xpath_filter_expr, TinyXPath::xpath_filter_expr_predicate, TinyXPath::xpath_filter_expr_primary, TinyXPath::xpath_function_call, TinyXPath::xpath_location_path, TinyXPath::xpath_location_path_abs, TinyXPath::xpath_location_path_rel, TinyXPath::xpath_multiplicative_expr, TinyXPath::xpath_multiplicative_expr_div, TinyXPath::xpath_multiplicative_expr_mod, TinyXPath::xpath_multiplicative_expr_simple, TinyXPath::xpath_multiplicative_expr_star, TinyXPath::xpath_name_test, TinyXPath::xpath_name_test_ncname, TinyXPath::xpath_name_test_qname, TinyXPath::xpath_name_test_star, TinyXPath::xpath_node_test, TinyXPath::xpath_node_test_name_test, TinyXPath::xpath_node_test_pi, TinyXPath::xpath_node_test_pi_lit, TinyXPath::xpath_node_test_reserved_keyword, TinyXPath::xpath_or_expr, TinyXPath::xpath_or_expr_or, TinyXPath::xpath_or_expr_simple, TinyXPath::xpath_path_expr, TinyXPath::xpath_path_expr_2_slash, TinyXPath::xpath_path_expr_filter, TinyXPath::xpath_path_expr_location_path, TinyXPath::xpath_path_expr_slash, TinyXPath::xpath_predicate, TinyXPath::xpath_predicate_expr, TinyXPath::xpath_primary_expr, TinyXPath::xpath_primary_expr_function_call, TinyXPath::xpath_primary_expr_literal, TinyXPath::xpath_primary_expr_number, TinyXPath::xpath_primary_expr_paren_expr, TinyXPath::xpath_primary_expr_variable, TinyXPath::xpath_relational_expr, TinyXPath::xpath_relational_expr_gt, TinyXPath::xpath_relational_expr_gte, TinyXPath::xpath_relational_expr_lt, TinyXPath::xpath_relational_expr_lte, TinyXPath::xpath_relational_expr_simple, TinyXPath::xpath_relative_location_path, TinyXPath::xpath_relative_location_path_rel_double_slash_step, TinyXPath::xpath_relative_location_path_rel_step, TinyXPath::xpath_relative_location_path_step, TinyXPath::xpath_unary_expr, TinyXPath::xpath_unary_expr_minus, TinyXPath::xpath_unary_expr_simple, TinyXPath::xpath_union_expr, TinyXPath::xpath_union_expr_simple, TinyXPath::xpath_union_expr_union, TinyXPath::xpath_variable_reference, TinyXPath::xpath_xml_local_part, TinyXPath::xpath_xml_prefix, TinyXPath::xpath_xml_q_name, TinyXPath::xpath_xml_q_name_colon, TinyXPath::xpath_xml_q_name_simple, and xs_stack.
Referenced by o_check_predicate(), v_execute_stack(), and v_execute_step().
void xpath_processor::v_execute_absolute_path | ( | unsigned | u_action_position, | |
bool | o_with_rel, | |||
bool | o_everywhere | |||
) | [protected] |
Execute a full set of absolute/relative/relative/.. computation.
u_action_position | Position of the placeholder after the rule | |
o_with_rel | true if there is some relative path | |
o_everywhere | true if it's a '//' path |
References as_action_store, TIXML_STRING, v_execute_step(), and TinyXPath::xpath_relative_location_path.
Referenced by v_execute_one().
void xpath_processor::v_execute_step | ( | int & | i_relative_action, | |
bool | o_skip_only | |||
) | [protected] |
One step execution.
Initialize the source node set if it's the first step of a path
i_relative_action | Path position : -1 if first in a '//' path, 0 if first in a '/' path, > 0 if followers |
References as_action_store, TiXmlNode::COMMENT, TiXmlNode::ELEMENT, i_pop_int(), TinyXPath::lex_ancestor, TinyXPath::lex_ancestor_or_self, TinyXPath::lex_attribute, TinyXPath::lex_child, TinyXPath::lex_comment, TinyXPath::lex_descendant, TinyXPath::lex_descendant_or_self, TinyXPath::lex_following, TinyXPath::lex_following_sibling, TinyXPath::lex_node, TinyXPath::lex_parent, TinyXPath::lex_preceding, TinyXPath::lex_preceding_sibling, TinyXPath::lex_self, TinyXPath::lex_text, o_check_predicate(), S_pop_string(), TiXmlNode::TEXT, TIXML_STRING, TinyXPath::node_set::u_get_nb_node_in_set(), v_execute_one(), v_pop_one_action(), v_push_node_set(), XEp_context, XEp_root, TinyXPath::xpath_axis_specifier, TinyXPath::xpath_node_test, TinyXPath::xpath_predicate, and xs_stack.
Referenced by v_execute_absolute_path(), and v_execute_one().
bool xpath_processor::o_check_predicate | ( | TiXmlElement * | XEp_child, | |
bool | o_by_name | |||
) | [protected] |
Spec extract :
A PredicateExpr is evaluated by evaluating the Expr and converting the result to a boolean. If the result is a number, the result will be converted to true if the number is equal to the context position and will be converted to false otherwise; if the result is not a number, then the result will be converted as if by a call to the boolean function. Thus a location path para[3] is equivalent to para[position()=3].
References TinyXPath::e_double, TinyXPath::e_int, TinyXPath::i_xml_cardinality(), v_execute_one(), v_set_context(), TinyXPath::xpath_predicate, and xs_stack.
Referenced by v_execute_step().
void xpath_processor::v_execute_function | ( | TiXmlString & | S_name, | |
unsigned | u_nb_arg, | |||
expression_result ** | erpp_arg | |||
) | [protected] |
Execute an XPath function. The arguments are in normal order in erpp_arg
Calls one of the following :
S_name | Function name | |
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References v_function_ceiling(), v_function_concat(), v_function_contains(), v_function_count(), v_function_false(), v_function_floor(), v_function_last(), v_function_name(), v_function_normalize_space(), v_function_not(), v_function_position(), v_function_starts_with(), v_function_string_length(), v_function_substring(), v_function_sum(), v_function_text(), and v_function_true().
Referenced by v_execute_one().
void xpath_processor::v_function_ceiling | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath ceiling function.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References TinyXPath::e_bool, TinyXPath::e_double, TinyXPath::e_int, and v_push_int().
Referenced by v_execute_function().
void xpath_processor::v_function_concat | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath concat function.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References TIXML_STRING, and v_push_string().
Referenced by v_execute_function().
void xpath_processor::v_function_contains | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath contains function.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References TIXML_STRING, and v_push_bool().
Referenced by v_execute_function().
void xpath_processor::v_function_count | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath count function.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References TinyXPath::e_node_set, and v_push_int().
Referenced by v_execute_function().
void xpath_processor::v_function_false | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath false function.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References v_push_bool().
Referenced by v_execute_function().
void xpath_processor::v_function_floor | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath floor function.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References TinyXPath::e_bool, TinyXPath::e_double, TinyXPath::e_int, and v_push_int().
Referenced by v_execute_function().
void xpath_processor::v_function_last | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath last function.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References TinyXPath::i_xml_family_size(), v_push_int(), XEp_context, and XEp_get_context().
Referenced by v_execute_function().
void xpath_processor::v_function_name | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath name function.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References TinyXPath::e_node_set, Name, TIXML_STRING, and v_push_string().
Referenced by v_execute_function().
void xpath_processor::v_function_normalize_space | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath normalize-space function.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References TinyXPath::S_remove_lead_trail(), TIXML_STRING, and v_push_string().
Referenced by v_execute_function().
void xpath_processor::v_function_not | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath not function.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References v_push_bool().
Referenced by v_execute_function().
void xpath_processor::v_function_position | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath position function.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References TinyXPath::i_xml_cardinality(), o_is_context_by_name, v_push_int(), XEp_context, and XEp_get_context().
Referenced by v_execute_function().
void xpath_processor::v_function_starts_with | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath starts-with function.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References TIXML_STRING, and v_push_bool().
Referenced by v_execute_function().
void xpath_processor::v_function_string_length | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath sttring-length function.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References TIXML_STRING, and v_push_int().
Referenced by v_execute_function().
void xpath_processor::v_function_substring | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath substring function
Standard excerpt:
The substring function returns the substring of the first argument starting at the position specified in the second argument with length specified in the third argument. For example, substring("12345",2,3) returns "234". If the third argument is not specified, it returns the substring starting at the position specified in the second argument and continuing to the end of the string. For example, substring("12345",2) returns "2345".
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References TIXML_STRING, and v_push_string().
Referenced by v_execute_function().
void xpath_processor::v_function_sum | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath sum function
Standard exerpt :
The sum function returns the sum, for each node in the argument node-set, of the result of converting the string-values of the node to a number.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References TinyXPath::e_node_set, v_push_double(), and v_push_int().
Referenced by v_execute_function().
void xpath_processor::v_function_text | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath text function.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References TiXmlNode::TEXT, TIXML_STRING, v_push_string(), XEp_context, and XEp_get_context().
Referenced by v_execute_function().
void xpath_processor::v_function_true | ( | unsigned | u_nb_arg, | |
expression_result ** | erpp_arg | |||
) | [protected] |
XPath true function.
u_nb_arg | Nb of arguments | |
erpp_arg | Argument list |
References v_push_bool().
Referenced by v_execute_function().
void xpath_processor::v_function_equal | ( | expression_result ** | erpp_arg | ) | [protected] |
This function is for internal use : evaluation of an equality expression
Standard excerpt :
If both objects to be compared are node-sets, then the comparison will be true if and only if there is a node in the first node-set and a node in the second node-set such that the result of performing the comparison on the string-values of the two nodes is true.
If one object to be compared is a node-set and the other is a number, then the comparison will be true if and only if there is a node in the node-set such that the result of performing the comparison on the number to be compared and on the result of converting the string-value of that node to a number using the number function is true.
If one object to be compared is a node-set and the other is a string, then the comparison will be true if and only if there is a node in the node-set such that the result of performing the comparison on the string-value of the node and the other string is true.
If one object to be compared is a node-set and the other is a boolean, then the comparison will be true if and only if the result of performing the comparison on the boolean and on the result of converting the node-set to a boolean using the boolean function is true.
When neither object to be compared is a node-set and the operator is = or !=, then the objects are compared by converting them to a common type as follows and then comparing them.
References TinyXPath::e_bool, TinyXPath::e_double, TinyXPath::e_int, TinyXPath::e_node_set, v_function_equal_2_node(), v_function_equal_node_and_other(), and v_push_bool().
Referenced by v_execute_one(), and v_function_not_equal().
void xpath_processor::v_function_not_equal | ( | expression_result ** | erpp_arg | ) | [protected] |
This function is for internal use : evaluation of a non-equality expression.
References o_pop_bool(), v_function_equal(), and v_push_bool().
Referenced by v_execute_one().
void xpath_processor::v_function_equal_node_and_other | ( | expression_result * | erp_node_set, | |
expression_result * | erp_non | |||
) | [protected] |
Utility function that evaluates the equality between a node set and a non-node set
Standard excerpt :
If one object to be compared is a node-set and the other is a number, then the comparison will be true if and only if there is a node in the node-set such that the result of performing the comparison on the number to be compared and on the result of converting the string-value of that node to a number using the number function is true.
If one object to be compared is a node-set and the other is a string, then the comparison will be true if and only if there is a node in the node-set such that the result of performing the comparison on the string-value of the node and the other string is true.
If one object to be compared is a node-set and the other is a boolean, then the comparison will be true if and only if the result of performing the comparison on the boolean and on the result of converting the node-set to a boolean using the boolean function is true.
References TinyXPath::e_bool, TinyXPath::e_double, TinyXPath::e_int, TinyXPath::e_string, and v_push_bool().
Referenced by v_function_equal().
void xpath_processor::v_function_equal_2_node | ( | expression_result * | erp_node_set_, | |
expression_result * | erp_node_set_2 | |||
) | [protected] |
Referenced by v_function_equal().
Union function.
References v_push_node_set().
Referenced by v_execute_one().
void xpath_processor::v_function_minus | ( | expression_result ** | erpp_arg | ) | [protected] |
XPath - function.
References TinyXPath::e_double, v_push_double(), and v_push_int().
Referenced by v_execute_one().
void xpath_processor::v_function_plus | ( | expression_result ** | erpp_arg | ) | [protected] |
XPath + function.
References TinyXPath::e_double, v_push_double(), and v_push_int().
Referenced by v_execute_one().
void xpath_processor::v_function_or | ( | expression_result ** | erpp_arg | ) | [protected] |
XPath or function.
References v_push_bool().
Referenced by v_execute_one().
void xpath_processor::v_function_and | ( | expression_result ** | erpp_arg | ) | [protected] |
XPath and function.
References v_push_bool().
Referenced by v_execute_one().
void xpath_processor::v_function_relational | ( | expression_result ** | erpp_arg, | |
unsigned | u_sub | |||
) | [protected] |
XPath relational comparison function.
References TinyXPath::e_double, v_push_bool(), TinyXPath::xpath_relational_expr_gt, TinyXPath::xpath_relational_expr_gte, TinyXPath::xpath_relational_expr_lt, and TinyXPath::xpath_relational_expr_lte.
Referenced by v_execute_one().
void xpath_processor::v_function_opposite | ( | ) | [protected] |
This function, because it only operates on one argument retrieves it himself from the stack
It computes the mathematical opposite
References TinyXPath::e_double, v_push_double(), v_push_int(), and xs_stack.
Referenced by v_execute_one().
void xpath_processor::v_function_mult | ( | expression_result ** | erpp_arg, | |
unsigned | u_sub | |||
) | [protected] |
XPath * function (arithmetic).
References TinyXPath::e_double, v_push_double(), v_push_int(), TinyXPath::xpath_multiplicative_expr_div, TinyXPath::xpath_multiplicative_expr_mod, and TinyXPath::xpath_multiplicative_expr_star.
Referenced by v_execute_one().
void xpath_processor::v_order_tree | ( | ) | [protected] |
flag that says if the tree has been ordered already. This is a rather slow process, so we only do it if needed
Order the tree : assign an integer to all nodes based on the document order
Right now, tinyxml doesn't have a user value associated to attributes ... arrrgh. We order everything else, and will have to compute attributes order on demand
References v_order_recurs(), and XEp_root.
Referenced by v_build_root().
void xpath_processor::v_order_recurs | ( | TiXmlNode * | Np_base, | |
int & | i_current | |||
) | [protected] |
Recursive ordering of an XML tree according to XPath's document order.
The result is stored as an integer in the void * pointer managed by TiXmlNode::SetUserData / TiXmlNode::GetUserData
Referenced by v_order_tree().
void TinyXPath::xpath_processor::v_push_int | ( | int | i_val, | |
const char * | cp_comment = "" | |||
) | [inline, protected] |
References v_push_int(), and xs_stack.
Referenced by v_execute_one(), v_function_ceiling(), v_function_count(), v_function_floor(), v_function_last(), v_function_minus(), v_function_mult(), v_function_opposite(), v_function_plus(), v_function_position(), v_function_string_length(), v_function_sum(), and v_push_int().
void TinyXPath::xpath_processor::v_push_string | ( | TiXmlString | S_val | ) | [inline, protected] |
References v_push_string(), and xs_stack.
Referenced by v_execute_one(), v_function_concat(), v_function_name(), v_function_normalize_space(), v_function_substring(), v_function_text(), and v_push_string().
void TinyXPath::xpath_processor::v_push_bool | ( | bool | o_val | ) | [inline, protected] |
References v_push_bool(), and xs_stack.
Referenced by v_function_and(), v_function_contains(), v_function_equal(), v_function_equal_node_and_other(), v_function_false(), v_function_not(), v_function_not_equal(), v_function_or(), v_function_relational(), v_function_starts_with(), v_function_true(), and v_push_bool().
void TinyXPath::xpath_processor::v_push_double | ( | double | d_val | ) | [inline, protected] |
References v_push_double(), and xs_stack.
Referenced by v_execute_one(), v_function_minus(), v_function_mult(), v_function_opposite(), v_function_plus(), v_function_sum(), and v_push_double().
void TinyXPath::xpath_processor::v_push_node_set | ( | node_set * | nsp_val | ) | [inline, protected] |
References v_push_node_set(), and xs_stack.
Referenced by v_execute_step(), v_function_union(), and v_push_node_set().
bool TinyXPath::xpath_processor::o_pop_bool | ( | ) | [inline, protected] |
References o_pop_bool(), and xs_stack.
Referenced by o_pop_bool(), and v_function_not_equal().
int TinyXPath::xpath_processor::i_pop_int | ( | ) | [inline, protected] |
References i_pop_int(), and xs_stack.
Referenced by i_pop_int(), v_execute_one(), and v_execute_step().
TiXmlString TinyXPath::xpath_processor::S_pop_string | ( | ) | [inline, protected] |
References S_pop_string(), and xs_stack.
Referenced by S_pop_string(), v_execute_one(), and v_execute_step().
node_set TinyXPath::xpath_processor::ns_pop_node_set | ( | ) | [inline, protected] |
References ns_pop_node_set(), and xs_stack.
Referenced by ns_pop_node_set(), and v_execute_one().
void xpath_processor::v_set_context | ( | TiXmlElement * | XEp_in, | |
bool | o_by_name | |||
) | [protected] |
Set the current context node for predicate evaluations.
XEp_in | Context node | |
o_by_name | true if the current node search is by name, false if it's a * |
References o_is_context_by_name, and XEp_context.
Referenced by o_check_predicate().
const TiXmlElement* TinyXPath::xpath_processor::XEp_get_context | ( | ) | [inline, protected] |
References XEp_context.
Referenced by v_function_last(), v_function_position(), and v_function_text().
void xpath_processor::v_build_root | ( | ) | [protected] |
References v_order_tree(), XEp_context, XEp_root, XNp_base, XNp_caller_next, XNp_caller_parent, and XNp_caller_prev.
Referenced by er_compute_xpath().
void xpath_processor::v_remove_root | ( | ) | [protected] |
Remove our fake root, and restore the original relationships of the node given to us as argument
References XEp_root, XNp_base, XNp_caller_next, XNp_caller_parent, and XNp_caller_prev.
Referenced by er_compute_xpath().
enum { ... } TinyXPath::xpath_processor::e_error |
Referenced by er_compute_xpath().
xpath_stack TinyXPath::xpath_processor::xs_stack [protected] |
Referenced by i_get_action_counter(), v_action(), v_execute_absolute_path(), v_execute_stack(), v_execute_step(), and v_pop_one_action().
TiXmlElement* TinyXPath::xpath_processor::XEp_root [protected] |
Root, above the XML tree given as parameter to the xpath_processor object.
Referenced by er_compute_xpath(), v_build_root(), v_execute_step(), v_order_tree(), and v_remove_root().
const TiXmlElement* TinyXPath::xpath_processor::XEp_context [protected] |
Current context.
Referenced by v_build_root(), v_execute_step(), v_function_last(), v_function_position(), v_function_text(), v_set_context(), XEp_get_context(), and xpath_processor().
The result of the XPath evaluation, for further node retrieving by v_get_xpath_base.
Referenced by er_compute_xpath(), u_compute_xpath_node_set(), and v_get_xpath_base().
bool TinyXPath::xpath_processor::o_is_context_by_name [protected] |
Referenced by v_function_position(), v_set_context(), and xpath_processor().
const TiXmlNode* TinyXPath::xpath_processor::XNp_caller_parent [protected] |
Referenced by v_build_root(), and v_remove_root().
const TiXmlNode* TinyXPath::xpath_processor::XNp_caller_prev [protected] |
Referenced by v_build_root(), and v_remove_root().
const TiXmlNode* TinyXPath::xpath_processor::XNp_caller_next [protected] |
Referenced by v_build_root(), and v_remove_root().
const TiXmlNode* TinyXPath::xpath_processor::XNp_base [protected] |
Referenced by v_build_root(), v_remove_root(), and xpath_processor().