X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2Ftable_driver.ml;h=64d1a1dae72a1448419d59c46f387128cc09a17c;hp=371dbdf5eba5fc53ad28d02878079e97f6369119;hb=72880536f01e8260441efda43430f893e8e4595b;hpb=cfaff4165f266dc2273989c9a62f3fd31c1f57ec diff --git a/src/table_driver.ml b/src/table_driver.ml index 371dbdf..64d1a1d 100644 --- a/src/table_driver.ml +++ b/src/table_driver.ml @@ -37,18 +37,6 @@ let main () = 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 - | Some f -> open_out f - in - List.iter (fun query -> - Logger.msg `STATS "Query: %a " Xpath.Ast.print_path query) queries; - List.iter (fun query_tree -> - Logger.msg `STATS "@[Query_tree: @\n%a@]" print_query_tree Format.std_formatter query_tree) query_tree_list; - - *) exit 0 @@ -60,76 +48,4 @@ let () = main () -(* let query = Xpath.Parser.parse - (Ulexing.from_utf8_string Sys.argv.(2)) - in - Format.printf "La requete est: %a\n%!" - Xpath.Ast.print_path query; *) - - (* print_endline "Test 1 root.firstchild"; - let c1 = eval_move doc [ (Naive_tree.root doc) ] Firstchild in - print_node_list doc c1; - print_endline "Test 2 root.firstchild.firstchild"; - let c2 = eval_move doc c1 Firstchild in - print_node_list doc c2; - print_endline "Test 3 root.firstchild.firstchild.nextsibling"; - let c3 = eval_move doc c2 Nextsibling in - print_node_list doc c3; - print_endline "Test 4 root.firstchild.firstchild.nextsibling.firstchild"; - let c4 = eval_move doc c3 Firstchild in - print_node_list doc c4; - print_endline "Test 5 root.firstchild.firstchild.nextsibling.firstchild.ancestor false"; - let c5 = eval_axis doc c4 (Ancestor false) in - print_node_list doc c5; - print_endline "Test 6"; - let c6 = eval_move doc c5 Prevsibling in - print_node_list doc c6; - print_endline "Test 7"; - let c7 = eval_move doc c6 Revfirstchild in - print_node_list doc c7; - print_endline "Test 8 Child [root]"; - let c8 = eval_axis doc [Naive_tree.root doc] Child in - print_node_list doc c8; - print_endline "Test 9 Descendant [b]"; - let c9 = eval_axis doc c2 (Descendant false) in - print_node_list doc c9; - print_endline "Test 10 Descendant or self [b]"; - let c10 = eval_axis doc c2 (Descendant true) in - print_node_list doc c10; - print_endline "Test 11 FollowingSibling [b]"; - let c11 = eval_axis doc c2 FollowingSibling in - print_node_list doc c11; - print_endline "Test 12 Parent [b]"; - let c12 = eval_axis doc c2 Parent in - print_node_list doc c12; - print_endline "Test 13 Ancestor or self [b]"; - let c13 = eval_axis doc c2 (Ancestor true) in - print_node_list doc c13; - print_endline "Test 14 PrecdingSibling [b]"; - let c14 = eval_axis doc c2 PrecedingSibling in - print_node_list doc c14; - print_endline "Test 15 preceding [b]"; - let c15 = eval_axis doc c2 Preceding in - print_node_list doc c15; - print_endline "Test 16 Following [b]"; - let c16 = eval_axis doc c2 Following in - print_node_list doc c16; - print_endline "Test 17 tag [b]"; - let c17 = element_by_tag doc (QName.make "b") in - print_node_list doc c17; - print_endline "Test 18 all nodes"; - let c18 = all_nodes doc in - print_node_list doc c18; - print_endline "Test 19 compile_xpath"; *) - - - (*Format.printf "Le document contient: %i noeuds\n%!" (Naive_tree.size doc); - let c19 = compile_xpath (parse_xpath "/child::a[child::b or not(following::]") in - Format.printf ">> %a\n%!" print_query_tree c19; - print_endline "Test 20 eval_query_tree"; - let res = eval_query_tree doc [ (Naive_tree.root doc) ] c19 in - print_node_list doc res; - print_endline "Fin";*) - -