| Axis of Xpath.Ast.axis * query_tree
| Start
| Dom
- | Tag of QNameSet.t
+ | Tag of QNameSet.t * Tree.NodeKind.t
and op = Union | Inter | Diff
+(*and query_tree = {
+ mutable desc : query_tree_desc;
+ mutable id : int;
+ mutable hash : int;
+}
+*)
+
+
+
+
+
(*28/01/2014
parametres : tree l'arbre xml
match q with
Dom -> Format.fprintf fmt "Dom"
| Start -> Format.fprintf fmt "Start"
- | Tag t -> Format.fprintf fmt "Tag(%a)" QNameSet.print t
+ | Tag (t,k) -> Format.fprintf fmt "Tag(%a, %a)" QNameSet.print t Tree.NodeKind.print k
| Axis (a,q) ->
Format.fprintf fmt "%a(%a)" Xpath.Ast.print_axis a print_query_tree q
| Binop (op,q1,q2) ->
retour : l'ensemble de noeuds qui correspondent ॆ l'axe
*)
-let keep_elements t l =
+let keep_elements t l = (*
List.filter (fun n -> match Naive_tree.kind t n with
| Element | Text | Document | Attribute -> true | _ -> false) l
+ *) l
-let keep_attributs t l =
+let keep_attributs t l = (*
List.filter (fun n -> match Naive_tree.kind t n with
- | Attribute ->true | _ -> false) l
+ | Attribute ->true | _ -> false) *) l
let rec eval_axis tree ls a =
let open Xpath.Ast in
match a with
- Self -> keep_elements tree ls
+ Self -> ls
| Attribute -> let lfc = eval_move tree ls Firstchild in
let lc = eval_star tree lfc [Nextsibling] in