Added charmap facility to delete leading articles
[idzebra-moved-to-github.git] / include / zebra_xpath.h
1 /* Moved from zrpn.c -pop */
2
3 #ifndef ZEBRA_XPATH_H
4 #define ZEBRA_XPATH_H
5
6 #define XPATH_STEP_COUNT 10
7 struct xpath_predicate {
8     int which;
9     union {
10 #define XPATH_PREDICATE_RELATION 1
11         struct {
12             char *name;
13             char *op;
14             char *value;
15         } relation;
16 #define XPATH_PREDICATE_BOOLEAN 2
17         struct {
18             const char *op;
19             struct xpath_predicate *left;
20             struct xpath_predicate *right;
21         } boolean;
22     } u;
23 };
24
25 struct xpath_location_step {
26     char *part;
27     struct xpath_predicate *predicate;
28 };
29
30 int zebra_parse_xpath_str(const char *xpath_string,
31                           struct xpath_location_step *xpath,
32                           int max, NMEM mem);
33
34 void dump_xp_steps (struct xpath_location_step *xpath, int no);
35
36 #endif