let query_tree_list =
List.map (fun query -> compile_xpath query) queries
in
- let cpt = ref 0 in
-
- List.iter ( fun q ->
-
+ List.iter ( fun q ->
let res = eval_query_tree doc [ (Naive_tree.root doc) ] q in
+ print_string "<xml_result num=\"1\" >\n";
print_node_list doc res;
- Format.printf "---------------Fin %i\n!" !cpt;
- incr cpt;
+ print_string "</xml_result>\n"
) query_tree_list ;
-
+
+ let _ = if !Table_options.count then
+ Format.fprintf Format.std_formatter "there are %i nodes\n" !Query_tree.compteur;
+ in
+
(* let output =
match !Options.output_file with
| None | Some "-" | Some "/dev/stdout" -> stdout