Ajout de l'implementation preliminaire.
[tatoo.git] / src / query_tree.mli
1 val all_nodes : Naive_tree.t -> Naive_tree.node list
2 (** [all_nodes t] returns all the nodes in the tree [t].
3     Returns an empty list if there are no nodes in the tree.
4  *)
5
6 val element_by_tag : Naive_tree.t -> QNameSet.t -> Naive_tree.node list
7 (** [element_by_tag t tag] returns all the nodes whose tag equal to [tag] in the tree [t]. *)
8
9 val compile_single_path : Xpath.Ast.single_path -> Table.query_tree 
10 (** il y a un cycle si on met la definition de query_tree dans le fichier [Query_tree.ml]
11     [compile_single_path spath] returns un query_tree built with [spath]
12 *)
13
14 val compile_xpath : Xpath.Ast.path -> Table.query_tree 
15 (** [compile_xpath path] returns un query_tree built with [xpath]
16 *)
17
18 val union_list : Naive_tree.t ->Naive_tree.node list -> Naive_tree.node list -> Naive_tree.node list
19 (** union two lists without duplicating
20 *)
21
22 val inter_list :  Naive_tree.t ->Naive_tree.node list -> Naive_tree.node list -> Naive_tree.node list
23 (** make a list without duplicating by using the intersection of two lists 
24 *)
25
26 val diff_list :  Naive_tree.t ->Naive_tree.node list -> Naive_tree.node list -> Naive_tree.node list 
27 (** difference two lists without duplicating
28 *)
29
30 val eval_query_tree : Naive_tree.t -> Naive_tree.node list ->Table.query_tree -> Naive_tree.node list
31 (** [eval_query_tree tree start q] returns the set of nodes that evaluate by the query_tree [q].
32     [start] the set of nodes departing.
33     [q] query_tree
34 *)