6a8678fdf263e454611fbc53e8d16a782007753e
[tatoo.git] / src / query_tree.mli
1 val compteur : int ref
2 (**the counter of nodes*)
3
4 val all_nodes : Naive_tree.t -> Naive_tree.node list
5 (** [all_nodes t] returns all the nodes in the tree [t].
6     Returns an empty list if there are no nodes in the tree.
7  *)
8
9 val element_by_tag : Naive_tree.t -> QNameSet.t -> Tree.NodeKind.t -> Naive_tree.node list
10 (** [element_by_tag t tag] returns all the nodes whose tag equal to [tag] in the tree [t]. *)
11
12 val compile_single_path : Xpath.Ast.single_path -> Table.query_tree 
13 (** il y a un cycle si on met la definition de query_tree dans le fichier [Query_tree.ml]
14     [compile_single_path spath] returns un query_tree built with [spath]
15 *)
16
17 val compile_xpath : Xpath.Ast.path -> Table.query_tree 
18 (** [compile_xpath path] returns un query_tree built with [xpath]
19 *)
20
21 val minimize_qtree : Table.query_tree -> Table.query_tree
22 (** [minimize_qtree q] returns the minimum query_tree of [q]
23     [q] query_tree
24 *)
25
26 val eval_qtree : Naive_tree.t -> Naive_tree.node list ->Table.query_tree -> Naive_tree.node list
27 (** [eval_qtree tree start q] returns the set of nodes that evaluate by the query_tree [q].
28     [start] the set of nodes departing.
29     [q] query_tree
30 *)