Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

TinyXPath Namespace Reference


Classes

class  action_item
 Action item for the XPath action placeholder
Able to store 1 quadruplet (3 integers and a string). More...

class  action_store
 The XPath action stack. More...

class  byte_stream
 A Byte stream class, very crude. More...

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
 A lexical token stream, part of a single linked list. More...

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
 A token list class. More...

class  token_redef
 Redefinition of a token_syntax_decoder, with an xpath_stream pointer
We could have made this a double dependency on token_syntax_decoder and xpath_stream, but this is not good pratice IMHO. More...

class  token_syntax_decoder
 XPath syntax decoder class. More...

class  xpath_processor
 XPath execution class. More...

class  xpath_stack
 The XPath execution stack
All elements are result_and_next elements. More...

class  xpath_stream
 A specialized version of byte_stream for XPath. More...


Typedefs

typedef unsigned char _byte_

Enumerations

enum  lexico {
  lex_null, lex_none, lex_space, lex_digit,
  lex_bchar, lex_extend, lex_slash, lex_at,
  lex_dot, lex_minus, lex_under, lex_colon,
  lex_scolon, lex_2_quote, lex_1_quote, lex_dollar,
  lex_oparen, lex_cparen, lex_star, lex_plus,
  lex_comma, lex_lt, lex_gt, lex_equal,
  lex_obrack, lex_cbrack, lex_orchar, lex_exclam,
  lex_ncname, lex_number, lex_literal, lex_2_colon,
  lex_2_slash, lex_2_dot, lex_not_equal, lex_lt_equal,
  lex_gt_equal, lex_start_keyword, lex_or = lex_start_keyword, lex_and,
  lex_mod, lex_div, lex_start_axis_name, lex_ancestor = lex_start_axis_name,
  lex_ancestor_or_self, lex_attribute, lex_child, lex_descendant,
  lex_descendant_or_self, lex_following, lex_following_sibling, lex_namespace,
  lex_parent, lex_preceding, lex_preceding_sibling, lex_self,
  lex_end_axis_name = lex_self, lex_processing_instruction, lex_comment, lex_node,
  lex_text, lex_end_keyword = lex_text
}
 Lexical XPath elements. More...

enum  xpath_construct {
  xpath_unknown = 0, xpath_location_path = 1, xpath_absolute_location_path = 2, xpath_relative_location_path = 3,
  xpath_step = 4, xpath_axis_specifier = 5, xpath_axis_name = 6, xpath_node_test = 7,
  xpath_predicate = 8, xpath_predicate_expr = 9, xpath_abbreviated_absolute_location_path = 10, xpath_abbrieviated_step = 12,
  xpath_abbreviated_axis_specifier = 13, xpath_expr = 14, xpath_primary_expr = 15, xpath_function_call = 16,
  xpath_argument = 17, xpath_union_expr = 18, xpath_path_expr = 19, xpath_filter_expr = 20,
  xpath_or_expr = 21, xpath_and_expr = 22, xpath_equality_expr = 23, xpath_relational_expr = 24,
  xpath_additive_expr = 25, xpath_multiplicative_expr = 26, xpath_unary_expr = 27, xpath_multiply_operator = 34,
  xpath_variable_reference = 36, xpath_name_test = 37, xpath_xml_q_name = 206, xpath_xml_prefix = 207,
  xpath_xml_local_part = 208
}
 XPath constructions. The ordinals are rules of XPath or XML definitions in w3c. More...

enum  xpath_sub {
  xpath_absolute_location_path_slash_rel, xpath_absolute_location_path_slash, xpath_absolute_location_path_abbrev, xpath_relative_location_path_rel_step,
  xpath_relative_location_path_rel_double_slash_step, xpath_relative_location_path_step, xpath_step_abbrev, xpath_step_full,
  xpath_primary_expr_variable, xpath_primary_expr_paren_expr, xpath_primary_expr_literal, xpath_primary_expr_number,
  xpath_primary_expr_function_call, xpath_name_test_star, xpath_name_test_ncname, xpath_name_test_qname,
  xpath_xml_q_name_colon, xpath_xml_q_name_simple, xpath_axis_specifier_at, xpath_axis_specifier_axis_name,
  xpath_axis_specifier_empty, xpath_path_expr_location_path, xpath_path_expr_filter, xpath_path_expr_slash,
  xpath_path_expr_2_slash, xpath_filter_expr_primary, xpath_filter_expr_predicate, xpath_location_path_rel,
  xpath_location_path_abs, xpath_node_test_reserved_keyword, xpath_node_test_pi, xpath_node_test_pi_lit,
  xpath_node_test_name_test, xpath_equality_expr_equal, xpath_equality_expr_not_equal, xpath_equality_expr_simple,
  xpath_union_expr_simple, xpath_union_expr_union, xpath_additive_expr_simple, xpath_additive_expr_plus,
  xpath_additive_expr_minus, xpath_additive_expr_more_plus, xpath_additive_expr_more_minus, xpath_or_expr_simple,
  xpath_or_expr_or, xpath_and_expr_simple, xpath_and_expr_and, xpath_relational_expr_simple,
  xpath_relational_expr_lt, xpath_relational_expr_gt, xpath_relational_expr_lte, xpath_relational_expr_gte,
  xpath_unary_expr_simple, xpath_unary_expr_minus, xpath_multiplicative_expr_simple, xpath_multiplicative_expr_star,
  xpath_multiplicative_expr_div, xpath_multiplicative_expr_mod, dummy
}
enum  e_expression_type {
  e_bool, e_string, e_int, e_double,
  e_node_set, e_invalid
}
 Expression types. More...


Functions

const char * cp_disp_class_lex (lexico lex_in)
 Dump a lexical element.

lexico lex_get_class (_byte_ b_in)
 Get the lexical class of an XPath expression byte.

bool o_is_axis_name (lexico lex_test)
 Check if a lexical element can be an axis name.

lexico lex_test_id (const _byte_ *bp_str, unsigned u_size, lexico lex_next)
 Check if an ID maps an existing keyword
Returns the new lexical element or lex_ncname if not found.

TIXML_STRING S_remove_lead_trail (const char *cp_in)
 Removes all leading and trailing white spaces.

void v_assign_int_to_string (TIXML_STRING &S_string, int i_val)
 Assign an integer to a string.

void v_assign_double_to_string (TIXML_STRING &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.

const char * cp_disp_construct (xpath_construct xc)
 Return the name of an xpath_construct enumerated.

void v_generate_ascii_htm ()
 Generates an ascii table summarizing all possible bytes and their XPath properties.

const char * cp_disp_class (_byte_ b_in)
 Display the lexical class of an XPath expression byte.

int i_compare_ptr_and_flag (const void *vp_1, const void *vp_2)
 Internal utility function for node set sorting.

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.

int i_xml_family_size (const TiXmlElement *XEp_elem)
 Family size : Nb of sibling elements (including ourselves).

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.

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.

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.

TIXML_STRING 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.

TiXmlNodeXNp_xpath_node (const TiXmlNode *XNp_source_tree, const char *cp_xpath_expr)
 Static function to compute a node XPath expression, without an error check.

TiXmlAttributeXAp_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 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.

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.

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.

bool o_xpath_string (const TiXmlNode *XNp_source_tree, const char *cp_xpath_expr, TIXML_STRING &S_res)
 Static function to compute a string XPath expression, without an error check.

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.

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.


Variables

const int i_alloc_size = 100
 Allocation unit.

lexico lex_char_map [256]
 Mapping of all the byte values into elementary lexical items.


Typedef Documentation

typedef unsigned char TinyXPath::_byte_
 


Enumeration Type Documentation

enum TinyXPath::e_expression_type
 

Expression types.

Enumeration values:
e_bool 
e_string 
e_int 
e_double 
e_node_set 
e_invalid 

enum TinyXPath::lexico
 

Lexical XPath elements.

Enumeration values:
lex_null 
lex_none 
lex_space 
lex_digit 
lex_bchar 
lex_extend 
lex_slash 
lex_at 
lex_dot 
lex_minus 
lex_under 
lex_colon 
lex_scolon 
lex_2_quote 
lex_1_quote 
lex_dollar 
lex_oparen 
lex_cparen 
lex_star 
lex_plus 
lex_comma 
lex_lt 
lex_gt 
lex_equal 
lex_obrack 
lex_cbrack 
lex_orchar 
lex_exclam 
lex_ncname 
lex_number 
lex_literal 
lex_2_colon 
lex_2_slash 
lex_2_dot 
lex_not_equal 
lex_lt_equal 
lex_gt_equal 
lex_start_keyword 
lex_or 
lex_and 
lex_mod 
lex_div 
lex_start_axis_name 
lex_ancestor 
lex_ancestor_or_self 
lex_attribute 
lex_child 
lex_descendant 
lex_descendant_or_self 
lex_following 
lex_following_sibling 
lex_namespace 
lex_parent 
lex_preceding 
lex_preceding_sibling 
lex_self 
lex_end_axis_name 
lex_processing_instruction 
lex_comment 
lex_node 
lex_text 
lex_end_keyword 

enum TinyXPath::xpath_construct
 

XPath constructions. The ordinals are rules of XPath or XML definitions in w3c.

Enumeration values:
xpath_unknown 
xpath_location_path 
xpath_absolute_location_path 
xpath_relative_location_path 
xpath_step 
xpath_axis_specifier 
xpath_axis_name 
xpath_node_test 
xpath_predicate 
xpath_predicate_expr 
xpath_abbreviated_absolute_location_path 
xpath_abbrieviated_step 
xpath_abbreviated_axis_specifier 
xpath_expr 
xpath_primary_expr 
xpath_function_call 
xpath_argument 
xpath_union_expr 
xpath_path_expr 
xpath_filter_expr 
xpath_or_expr 
xpath_and_expr 
xpath_equality_expr 
xpath_relational_expr 
xpath_additive_expr 
xpath_multiplicative_expr 
xpath_unary_expr 
xpath_multiply_operator 
xpath_variable_reference 
xpath_name_test 
xpath_xml_q_name 
xpath_xml_prefix 
xpath_xml_local_part 

enum TinyXPath::xpath_sub
 

Enumeration values:
xpath_absolute_location_path_slash_rel 
xpath_absolute_location_path_slash 
xpath_absolute_location_path_abbrev 
xpath_relative_location_path_rel_step 
xpath_relative_location_path_rel_double_slash_step 
xpath_relative_location_path_step 
xpath_step_abbrev 
xpath_step_full 
xpath_primary_expr_variable 
xpath_primary_expr_paren_expr 
xpath_primary_expr_literal 
xpath_primary_expr_number 
xpath_primary_expr_function_call 
xpath_name_test_star 
xpath_name_test_ncname 
xpath_name_test_qname 
xpath_xml_q_name_colon 
xpath_xml_q_name_simple 
xpath_axis_specifier_at 
xpath_axis_specifier_axis_name 
xpath_axis_specifier_empty 
xpath_path_expr_location_path 
xpath_path_expr_filter 
xpath_path_expr_slash 
xpath_path_expr_2_slash 
xpath_filter_expr_primary 
xpath_filter_expr_predicate 
xpath_location_path_rel 
xpath_location_path_abs 
xpath_node_test_reserved_keyword 
xpath_node_test_pi 
xpath_node_test_pi_lit 
xpath_node_test_name_test 
xpath_equality_expr_equal 
xpath_equality_expr_not_equal 
xpath_equality_expr_simple 
xpath_union_expr_simple 
xpath_union_expr_union 
xpath_additive_expr_simple 
xpath_additive_expr_plus 
xpath_additive_expr_minus 
xpath_additive_expr_more_plus 
xpath_additive_expr_more_minus 
xpath_or_expr_simple 
xpath_or_expr_or 
xpath_and_expr_simple 
xpath_and_expr_and 
xpath_relational_expr_simple 
xpath_relational_expr_lt 
xpath_relational_expr_gt 
xpath_relational_expr_lte 
xpath_relational_expr_gte 
xpath_unary_expr_simple 
xpath_unary_expr_minus 
xpath_multiplicative_expr_simple 
xpath_multiplicative_expr_star 
xpath_multiplicative_expr_div 
xpath_multiplicative_expr_mod 
dummy 


Function Documentation

const char * TinyXPath::cp_disp_class _byte_  b_in  ) 
 

Display the lexical class of an XPath expression byte.

const char * TinyXPath::cp_disp_class_lex lexico  lex_in  ) 
 

Dump a lexical element.

const char * TinyXPath::cp_disp_construct xpath_construct  xc  ) 
 

Return the name of an xpath_construct enumerated.

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.

int i_compare_ptr_and_flag const void *  vp_1,
const void *  vp_2
 

Internal utility function for node set sorting.

Parameters:
vp_1  Ptr to first element to compare
vp_2  Ptr to second element to compare

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.

Parameters:
XEp_elem  Base element. Must not be null
o_by_name  true if we ask for the cardinality for our name only

int TinyXPath::i_xml_family_size const TiXmlElement XEp_elem  ) 
 

Family size : Nb of sibling elements (including ourselves).

Parameters:
XEp_elem  Base element. Must not be null

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.

lexico TinyXPath::lex_get_class _byte_  b_in  ) 
 

Get the lexical class of an XPath expression byte.

lexico TinyXPath::lex_test_id const _byte_ *  bp_str,
unsigned  u_size,
lexico  lex_next
 

Check if an ID maps an existing keyword
Returns the new lexical element or lex_ncname if not found.

bool TinyXPath::o_is_axis_name lexico  lex_test  ) 
 

Check if a lexical element can be an axis name.

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.

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.

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.

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.

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.

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.

bool TinyXPath::o_xpath_string const TiXmlNode XNp_source_tree,
const char *  cp_xpath_expr,
TIXML_STRING &  S_res
 

Static function to compute a string XPath expression, without an error check.

TIXML_STRING TinyXPath::S_remove_lead_trail const char *  cp_in  ) 
 

Removes all leading and trailing white spaces.

TIXML_STRING 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.

void TinyXPath::v_assign_double_to_string TIXML_STRING &  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.

void TinyXPath::v_assign_int_to_string TIXML_STRING &  S_string,
int  i_val
 

Assign an integer to a string.

void TinyXPath::v_generate_ascii_htm  ) 
 

Generates an ascii table summarizing all possible bytes and their XPath properties.

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.

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.


Variable Documentation

const int TinyXPath::i_alloc_size = 100
 

Allocation unit.

lexico TinyXPath::lex_char_map[256] [static]
 

Mapping of all the byte values into elementary lexical items.


Generated for TinyXPath by doxygen SourceForge Logo