/xmlbench/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/xmlbench/trunk

« back to all changes in this revision

Viewing changes to parse/tools.h

  • Committer: Suren A. Chilingaryan
  • Date: 2009-10-09 04:07:13 UTC
  • Revision ID: csa@dside.dyndns.org-20091009040713-mel06whc852tf2xz
XPath expression optimizations, various fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
int walk_tree = 0;
19
19
int fast_mode = 0;
 
20
int force_xpath = 0;
 
21
 
20
22
//const char *walk_xpath = "//*[(@* or text()) and (count(../child::*)>3)]";
21
 
const char *walk_xpath = "//*[(number(@*) or number(text())) and (count(../child::*)>3)]";
 
23
//const char *walk_xpath = "//*[(number(@*) or number(text())) and (count(../child::*)>3)]";
 
24
//const char *walk_xpath = "//*[(number(@*) or number(text())) and (last()>3)]";
 
25
const char *walk_xpath = "//*[count(child::*)>3]/*[number(@*) or number(text())]";
22
26
 
23
27
int get_walk_mode() {
24
28
    return walk_tree;
131
135
    else walk_tree = 0;
132
136
    if (getenv("fast_mode")) fast_mode = 1;
133
137
    else fast_mode = 0;
 
138
    if (getenv("force_xpath")) force_xpath = 1;
 
139
    else force_xpath = 0;
134
140
 
135
141
    
136
142
    if ((argc<3)||(argc>4)) Usage(argv[0]);