ddc
|
Classes | |
class | action_item |
class | action_store |
class | byte_stream |
class | error_not_yet |
class | execution_error |
Exceptions. More... | |
class | expression_result |
Class holding the result of an expression (e_expression_type) More... | |
class | lex_token |
class | node_set |
Node set class. A node set is an unordered collection of node. More... | |
class | ptr_and_flag |
Internal utility class for the node set sorting. More... | |
class | result_and_next |
xpath_stack element. Derives from expression_result, and also contains a pointer to the next element on the stack More... | |
class | syntax_error |
Exception class for a syntax error. More... | |
class | syntax_overflow |
Exception class for an overflow in syntax decoding. More... | |
class | token_list |
class | token_redef |
class | token_syntax_decoder |
class | xpath_processor |
XPath execution class. More... | |
class | xpath_stack |
class | xpath_stream |
Typedefs | |
typedef unsigned char | _byte_ |
Functions | |
const char * | cp_disp_class_lex (lexico lex_in) |
Dump a lexical element. More... | |
lexico | lex_get_class (_byte_ b_in) |
Get the lexical class of an XPath expression byte. More... | |
bool | o_is_axis_name (lexico lex_test) |
Check if a lexical element can be an axis name. More... | |
lexico | lex_test_id (const _byte_ *bp_str, unsigned u_size, lexico lex_next) |
TiXmlString | S_remove_lead_trail (const char *cp_in) |
Removes all leading and trailing white spaces. More... | |
void | v_assign_int_to_string (TiXmlString &S_string, int i_val) |
Assign an integer to a string. More... | |
void | v_assign_double_to_string (TiXmlString &S_string, double d_val) |
int | i_compare_ptr_and_flag (const void *vp_1, const void *vp_2) |
Internal utility function for node set sorting. More... | |
int | i_xml_cardinality (const TiXmlElement *XEp_elem, bool o_by_name) |
Cardinality in the terms of XPath counts from 1 for the first element. More... | |
int | i_xml_family_size (const TiXmlElement *XEp_elem) |
Family size : Nb of sibling elements (including ourselves) More... | |
int | i_xpath_int (const TiXmlNode *XNp_source_tree, const char *cp_xpath_expr) |
Static function to compute an integer XPath expression, without an error check. More... | |
double | d_xpath_double (const TiXmlNode *XNp_source_tree, const char *cp_xpath_expr) |
Static function to compute a double XPath expression, without an error check. More... | |
bool | o_xpath_bool (const TiXmlNode *XNp_source_tree, const char *cp_xpath_expr) |
Static function to compute a bool XPath expression, without an error check. More... | |
TiXmlString | S_xpath_string (const TiXmlNode *XNp_source_tree, const char *cp_xpath_expr) |
Static function to compute a string XPath expression, without an error check. More... | |
TiXmlNode * | XNp_xpath_node (const TiXmlNode *XNp_source_tree, const char *cp_xpath_expr) |
Static function to compute a node XPath expression, without an error check. More... | |
TiXmlAttribute * | XAp_xpath_attribute (const TiXmlNode *XNp_source_tree, const char *cp_xpath_expr) |
Static function to compute an attribute XPath expression, without an error check. More... | |
bool | o_xpath_int (const TiXmlNode *XNp_source_tree, const char *cp_xpath_expr, int &i_res) |
Static function to compute an integer XPath expression, with an error check. More... | |
bool | o_xpath_double (const TiXmlNode *XNp_source_tree, const char *cp_xpath_expr, double &d_res) |
Static function to compute a double XPath expression, without an error check. More... | |
bool | o_xpath_bool (const TiXmlNode *XNp_source_tree, const char *cp_xpath_expr, bool &o_res) |
Static function to compute a bool XPath expression, without an error check. More... | |
bool | o_xpath_string (const TiXmlNode *XNp_source_tree, const char *cp_xpath_expr, TiXmlString &S_res) |
Static function to compute a string XPath expression, without an error check. More... | |
bool | o_xpath_node (const TiXmlNode *XNp_source_tree, const char *cp_xpath_expr, const TiXmlNode *&XNp_node) |
Static function to compute a node XPath expression, without an error check. More... | |
bool | o_xpath_attribute (const TiXmlNode *XNp_source_tree, const char *cp_xpath_expr, const TiXmlAttribute *&XAp_attrib) |
Static function to compute an attribute XPath expression, without an error check. More... | |
Variables | |
const int | i_alloc_size = 100 |
Allocation unit. More... | |
static lexico | lex_char_map [256] |
Mapping of all the byte values into elementary lexical items. More... | |
typedef unsigned char TinyXPath::_byte_ |
enum TinyXPath::lexico |
Lexical XPath elements.
XPath constructions. The ordinals are rules of XPath or XML definitions in w3c.
enum TinyXPath::xpath_sub |
const char * TinyXPath::cp_disp_class_lex | ( | lexico | lex_in | ) |
Dump a lexical element.
References lex_1_quote, lex_2_colon, lex_2_dot, lex_2_quote, lex_2_slash, lex_ancestor, lex_ancestor_or_self, lex_and, lex_at, lex_attribute, lex_bchar, lex_cbrack, lex_child, lex_colon, lex_comma, lex_comment, lex_cparen, lex_descendant, lex_descendant_or_self, lex_digit, lex_div, lex_dollar, lex_dot, lex_equal, lex_exclam, lex_extend, lex_following, lex_following_sibling, lex_gt, lex_gt_equal, lex_literal, lex_lt, lex_lt_equal, lex_minus, lex_mod, lex_namespace, lex_ncname, lex_node, lex_none, lex_not_equal, lex_null, lex_number, lex_obrack, lex_oparen, lex_or, lex_orchar, lex_parent, lex_plus, lex_preceding, lex_preceding_sibling, lex_processing_instruction, lex_scolon, lex_self, lex_slash, lex_space, lex_star, lex_text, and lex_under.
Referenced by lex_test_id(), v_assign_double_to_string(), and TinyXPath::token_syntax_decoder::v_syntax_decode().
Get the lexical class of an XPath expression byte.
Referenced by v_assign_double_to_string(), and TinyXPath::xpath_stream::v_lexico_decode().
bool TinyXPath::o_is_axis_name | ( | lexico | lex_test | ) |
Check if a lexical element can be an axis name.
References lex_end_axis_name, and lex_start_axis_name.
Referenced by TinyXPath::token_syntax_decoder::o_recognize().
Check if an ID maps an existing keyword
Returns the new lexical element or lex_ncname if not found
References cp_disp_class_lex(), lex_end_keyword, lex_ncname, lex_oparen, lex_start_keyword, and lex_text.
Referenced by TinyXPath::xpath_stream::v_lexico_decode().
TiXmlString TinyXPath::S_remove_lead_trail | ( | const char * | cp_in | ) |
Removes all leading and trailing white spaces.
References TIXML_STRING.
Referenced by TinyXPath::xpath_processor::v_function_normalize_space().
void TinyXPath::v_assign_int_to_string | ( | TiXmlString & | S_string, |
int | i_val | ||
) |
Assign an integer to a string.
Referenced by TinyXPath::expression_result::S_get_string().
void TinyXPath::v_assign_double_to_string | ( | TiXmlString & | S_string, |
double | d_val | ||
) |
Assign a double to a string, cleaning any trailing zeroes and the decimal point if there's no decimal part
References cp_disp_class_lex(), lex_get_class(), xpath_abbreviated_absolute_location_path, xpath_abbreviated_axis_specifier, xpath_abbrieviated_step, xpath_absolute_location_path, xpath_additive_expr, xpath_and_expr, xpath_argument, xpath_axis_name, xpath_axis_specifier, xpath_equality_expr, xpath_expr, xpath_filter_expr, xpath_function_call, xpath_location_path, xpath_multiplicative_expr, xpath_multiply_operator, xpath_name_test, xpath_node_test, xpath_or_expr, xpath_path_expr, xpath_predicate, xpath_predicate_expr, xpath_primary_expr, xpath_relational_expr, xpath_relative_location_path, xpath_step, xpath_unary_expr, xpath_union_expr, xpath_unknown, xpath_variable_reference, xpath_xml_local_part, xpath_xml_prefix, and xpath_xml_q_name.
Referenced by TinyXPath::expression_result::S_get_string().
int TinyXPath::i_compare_ptr_and_flag | ( | const void * | vp_1, |
const void * | vp_2 | ||
) |
Internal utility function for node set sorting.
vp_1 | Ptr to first element to compare |
vp_2 | Ptr to second element to compare |
Referenced by TinyXPath::node_set::v_document_sort().
int TinyXPath::i_xml_cardinality | ( | const TiXmlElement * | XEp_elem, |
bool | o_by_name | ||
) |
Cardinality in the terms of XPath counts from 1 for the first element.
XEp_elem | Base element. Must not be null |
o_by_name | true if we ask for the cardinality for our name only |
References TIXML_STRING.
Referenced by TinyXPath::xpath_processor::o_check_predicate(), and TinyXPath::xpath_processor::v_function_position().
int TinyXPath::i_xml_family_size | ( | const TiXmlElement * | XEp_elem | ) |
Family size : Nb of sibling elements (including ourselves)
XEp_elem | Base element. Must not be null |
Referenced by TinyXPath::xpath_processor::v_function_last().
int TinyXPath::i_xpath_int | ( | const TiXmlNode * | XNp_source_tree, |
const char * | cp_xpath_expr | ||
) |
Static function to compute an integer XPath expression, without an error check.
Referenced by main().
double TinyXPath::d_xpath_double | ( | const TiXmlNode * | XNp_source_tree, |
const char * | cp_xpath_expr | ||
) |
Static function to compute a double XPath expression, without an error check.
bool TinyXPath::o_xpath_bool | ( | const TiXmlNode * | XNp_source_tree, |
const char * | cp_xpath_expr | ||
) |
Static function to compute a bool XPath expression, without an error check.
TiXmlString TinyXPath::S_xpath_string | ( | const TiXmlNode * | XNp_source_tree, |
const char * | cp_xpath_expr | ||
) |
Static function to compute a string XPath expression, without an error check.
Referenced by main(), and v_test_one_string_tiny().
TiXmlNode * TinyXPath::XNp_xpath_node | ( | const TiXmlNode * | XNp_source_tree, |
const char * | cp_xpath_expr | ||
) |
Static function to compute a node XPath expression, without an error check.
Referenced by CBiblIndex::GetTextAreaElements().
TiXmlAttribute * TinyXPath::XAp_xpath_attribute | ( | const TiXmlNode * | XNp_source_tree, |
const char * | cp_xpath_expr | ||
) |
Static function to compute an attribute XPath expression, without an error check.
bool TinyXPath::o_xpath_int | ( | const TiXmlNode * | XNp_source_tree, |
const char * | cp_xpath_expr, | ||
int & | i_res | ||
) |
Static function to compute an integer XPath expression, with an error check.
References TinyXPath::xpath_processor::e_no_error.
bool TinyXPath::o_xpath_double | ( | const TiXmlNode * | XNp_source_tree, |
const char * | cp_xpath_expr, | ||
double & | d_res | ||
) |
Static function to compute a double XPath expression, without an error check.
References TinyXPath::xpath_processor::e_no_error.
Referenced by main().
bool TinyXPath::o_xpath_bool | ( | const TiXmlNode * | XNp_source_tree, |
const char * | cp_xpath_expr, | ||
bool & | o_res | ||
) |
Static function to compute a bool XPath expression, without an error check.
References TinyXPath::xpath_processor::e_no_error.
bool TinyXPath::o_xpath_string | ( | const TiXmlNode * | XNp_source_tree, |
const char * | cp_xpath_expr, | ||
TiXmlString & | S_res | ||
) |
Static function to compute a string XPath expression, without an error check.
References TinyXPath::xpath_processor::e_no_error.
bool TinyXPath::o_xpath_node | ( | const TiXmlNode * | XNp_source_tree, |
const char * | cp_xpath_expr, | ||
const TiXmlNode *& | XNp_node | ||
) |
Static function to compute a node XPath expression, without an error check.
References TinyXPath::xpath_processor::e_no_error.
bool TinyXPath::o_xpath_attribute | ( | const TiXmlNode * | XNp_source_tree, |
const char * | cp_xpath_expr, | ||
const TiXmlAttribute *& | XAp_attrib | ||
) |
Static function to compute an attribute XPath expression, without an error check.
References TinyXPath::xpath_processor::e_no_error.
const int TinyXPath::i_alloc_size = 100 |
Allocation unit.
Referenced by TinyXPath::action_store::v_add().
|
static |
Mapping of all the byte values into elementary lexical items.